function MenuLinksTest::setUp
Same name in other branches
- 8.9.x core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php \Drupal\Tests\menu_link_content\Kernel\MenuLinksTest::setUp()
- 10 core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php \Drupal\Tests\menu_link_content\Kernel\MenuLinksTest::setUp()
- 11.x core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php \Drupal\Tests\menu_link_content\Kernel\MenuLinksTest::setUp()
Overrides KernelTestBase::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\KernelCode
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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.