You are here

protected function MenuRouterTest::doTestMenuOnRoute 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::doTestMenuOnRoute()

Tests a menu on a router page.

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

File

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

Class

MenuRouterTest
Tests menu router and default menu link functionality.

Namespace

Drupal\system\Tests\Menu

Code

protected function doTestMenuOnRoute() {
  \Drupal::service('module_installer')
    ->install(array(
    'router_test',
  ));
  \Drupal::service('router.builder')
    ->rebuild();
  $this
    ->resetAll();
  $this
    ->drupalGet('router_test/test2');
  $this
    ->assertLinkByHref('menu_no_title_callback');
  $this
    ->assertLinkByHref('menu-title-test/case1');
  $this
    ->assertLinkByHref('menu-title-test/case2');
  $this
    ->assertLinkByHref('menu-title-test/case3');
}