function TestPageTestController::testPageVarDump
Same name in other branches
- 9 core/modules/system/tests/modules/test_page_test/src/Controller/TestPageTestController.php \Drupal\test_page_test\Controller\TestPageTestController::testPageVarDump()
- 10 core/modules/system/tests/modules/test_page_test/src/Controller/TestPageTestController.php \Drupal\test_page_test\Controller\TestPageTestController::testPageVarDump()
Returns a test page and with the call to the dump() function.
1 string reference to 'TestPageTestController::testPageVarDump'
- test_page_test.routing.yml in core/
modules/ system/ tests/ modules/ test_page_test/ test_page_test.routing.yml - core/modules/system/tests/modules/test_page_test/test_page_test.routing.yml
File
-
core/
modules/ system/ tests/ modules/ test_page_test/ src/ Controller/ TestPageTestController.php, line 33
Class
- TestPageTestController
- Controller routines for test_page_test routes.
Namespace
Drupal\test_page_test\ControllerCode
public function testPageVarDump() {
$role = Role::create([
'id' => 'test_role',
'label' => 'Test role',
]);
dump($role);
return [
'#title' => t('Test page with var dump'),
'#markup' => t('Test page text.'),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.