protected function MenuRouterTest::doTestTitleMenuCallback in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::doTestTitleMenuCallback()
Tests page title of MENU_CALLBACKs.
1 call to MenuRouterTest::doTestTitleMenuCallback()
- MenuRouterTest::testMenuIntegration in core/
modules/ system/ tests/ src/ Functional/ Menu/ MenuRouterTest.php - Tests menu integration.
File
- core/
modules/ system/ tests/ src/ Functional/ Menu/ MenuRouterTest.php, line 89
Class
- MenuRouterTest
- Tests menu router and default menu link functionality.
Namespace
Drupal\Tests\system\Functional\MenuCode
protected function doTestTitleMenuCallback() {
// Verify that the menu router item title is not visible.
$this
->drupalGet('');
$this
->assertSession()
->pageTextNotContains('Menu Callback Title');
// Verify that the menu router item title is output as page title.
$this
->drupalGet('menu_callback_title');
$this
->assertSession()
->pageTextContains('Menu Callback Title');
}