function SystemMenuBlockTest::testSystemMenuBlockConfigDependencies
Same name in other branches
- 9 core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php \Drupal\Tests\system\Kernel\Block\SystemMenuBlockTest::testSystemMenuBlockConfigDependencies()
- 8.9.x core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php \Drupal\Tests\system\Kernel\Block\SystemMenuBlockTest::testSystemMenuBlockConfigDependencies()
- 10 core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php \Drupal\Tests\system\Kernel\Block\SystemMenuBlockTest::testSystemMenuBlockConfigDependencies()
Tests calculation of a system menu block's configuration dependencies.
File
-
core/
modules/ system/ tests/ src/ Kernel/ Block/ SystemMenuBlockTest.php, line 154
Class
Namespace
Drupal\Tests\system\Kernel\BlockCode
public function testSystemMenuBlockConfigDependencies() : void {
$block = Block::create([
'plugin' => 'system_menu_block:' . $this->menu
->id(),
'region' => 'footer',
'id' => 'machine_name',
'theme' => 'stark',
]);
$dependencies = $block->calculateDependencies()
->getDependencies();
$expected = [
'config' => [
'system.menu.' . $this->menu
->id(),
],
'module' => [
'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.