public function TestPageTestController::testPageVarDump in Drupal 9
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 31
Class
- TestPageTestController
- Controller routines for test_page_test routes.
Namespace
Drupal\test_page_test\ControllerCode
public function testPageVarDump() {
$role = Role::create([
'id' => 'test_role',
]);
dump($role);
return [
'#title' => t('Test page with var dump'),
'#markup' => t('Test page text.'),
];
}