public function SystemMenuBlockTest::testSystemMenuBlockConfigDependencies in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php \Drupal\Tests\system\Kernel\Block\SystemMenuBlockTest::testSystemMenuBlockConfigDependencies()
- 9 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);
}