You are here

protected function MenuRouterTest::doTestTitleMenuCallback in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Menu/MenuRouterTest.php \Drupal\system\Tests\Menu\MenuRouterTest::doTestTitleMenuCallback()

Tests page title of MENU_CALLBACKs.

1 call to MenuRouterTest::doTestTitleMenuCallback()
MenuRouterTest::testMenuIntegration in core/modules/system/src/Tests/Menu/MenuRouterTest.php
Tests menu integration.

File

core/modules/system/src/Tests/Menu/MenuRouterTest.php, line 96
Contains \Drupal\system\Tests\Menu\MenuRouterTest.

Class

MenuRouterTest
Tests menu router and default menu link functionality.

Namespace

Drupal\system\Tests\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'));
}