function NavigationMenuBlockTest::testSystemMenuBlockConfigDependencies
Same name in other branches
- 10 core/modules/navigation/tests/src/Kernel/NavigationMenuBlockTest.php \Drupal\Tests\navigation\Kernel\NavigationMenuBlockTest::testSystemMenuBlockConfigDependencies()
Tests calculation of a system navigation menu block's config dependencies.
File
-
core/
modules/ navigation/ tests/ src/ Kernel/ NavigationMenuBlockTest.php, line 181
Class
Namespace
Drupal\Tests\navigation\KernelCode
public function testSystemMenuBlockConfigDependencies() : void {
$block = Block::create([
'plugin' => 'navigation_menu:' . $this->menu
->id(),
'region' => 'content',
'id' => 'machine_name',
'theme' => 'stark',
]);
$dependencies = $block->calculateDependencies()
->getDependencies();
$expected = [
'config' => [
'system.menu.' . $this->menu
->id(),
],
'module' => [
'navigation',
'system',
],
'theme' => [
'stark',
],
];
$this->assertSame($expected, $dependencies);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.