You are here

protected function MenuRouterTest::doTestTitleMenuCallback in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::doTestTitleMenuCallback()
  2. 9 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\Menu

Code

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');
}