You are here

protected function MenuLinksTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php \Drupal\Tests\menu_link_content\Kernel\MenuLinksTest::setUp()
  2. 9 core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php \Drupal\Tests\menu_link_content\Kernel\MenuLinksTest::setUp()

File

core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php, line 42

Class

MenuLinksTest
Tests handling of menu links hierarchies.

Namespace

Drupal\Tests\menu_link_content\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this->menuLinkManager = \Drupal::service('plugin.manager.menu.link');
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  $this
    ->installEntitySchema('entity_test_external');
  $this
    ->installEntitySchema('menu_link_content');
  $this
    ->installEntitySchema('user');
  Menu::create([
    'id' => 'menu_test',
    'label' => 'Test menu',
    'description' => 'Description text',
  ])
    ->save();
}