function SystemMenuBlockTest::testSystemMenuBlockConfigDependencies
Same name in other branches
- 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()
- 11.x 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() {
$block = Block::create([
'plugin' => 'system_menu_block:' . $this->menu
->id(),
'region' => 'footer',
'id' => 'machinename',
'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.