function RouterTest::testTitleMenuCallback

Tests page title of MENU_CALLBACKs.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Menu/RouterTest.php, line 73
Definition of Drupal\system\Tests\Menu\RouterTest.

Class

RouterTest
Tests menu router and hook_menu() functionality.

Namespace

Drupal\system\Tests\Menu

Code

function testTitleMenuCallback() {

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