You are here

protected function MenuLinkTreeTest::setUp in Drupal 8

Same name in this branch
  1. 8 core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php \Drupal\KernelTests\Core\Menu\MenuLinkTreeTest::setUp()
  2. 8 core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php \Drupal\Tests\system\Unit\Menu\MenuLinkTreeTest::setUp()
Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php \Drupal\KernelTests\Core\Menu\MenuLinkTreeTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php, line 50

Class

MenuLinkTreeTest
Tests the menu link tree.

Namespace

Drupal\KernelTests\Core\Menu

Code

protected function setUp() {
  parent::setUp();
  \Drupal::service('router.builder')
    ->rebuild();
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('menu_link_content');
  $this->linkTree = $this->container
    ->get('menu.link_tree');
  $this->menuLinkManager = $this->container
    ->get('plugin.manager.menu.link');
}