function MenuRouterTest::doTestDescriptionMenuItems

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::doTestDescriptionMenuItems()
  2. 8.9.x core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::doTestDescriptionMenuItems()
  3. 10 core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php \Drupal\Tests\system\Functional\Menu\MenuRouterTest::doTestDescriptionMenuItems()

Tests menu item descriptions.

File

core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php, line 104

Class

MenuRouterTest
Tests menu router and default menu link functionality.

Namespace

Drupal\Tests\system\Functional\Menu

Code

protected function doTestDescriptionMenuItems() : void {
    // Verify that the menu router item title is output as page title.
    $this->drupalGet('menu_callback_description');
    $this->assertSession()
        ->pageTextContains('Menu item description text');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.