You are here

protected function MenuRouterTest::doTestTitleMenuCallback in Drupal 8

Same name and namespace in other branches
  1. 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
    ->assertNoText(t('Menu Callback Title'));

  // Verify that the menu router item title is output as page title.
  $this
    ->drupalGet('menu_callback_title');
  $this
    ->assertText(t('Menu Callback Title'));
}