public function BlockDependenciesTest::testExposedBlock in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php \Drupal\Tests\views\Kernel\Plugin\BlockDependenciesTest::testExposedBlock()
- 9 core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php \Drupal\Tests\views\Kernel\Plugin\BlockDependenciesTest::testExposedBlock()
Tests that exposed filter blocks have the correct dependencies.
See also
\Drupal\views\Plugin\Derivative\ViewsExposedFilterBlock::getDerivativeDefinitions()
File
- core/
modules/ views/ tests/ src/ Kernel/ Plugin/ BlockDependenciesTest.php, line 34
Class
- BlockDependenciesTest
- Tests views block config dependencies functionality.
Namespace
Drupal\Tests\views\Kernel\PluginCode
public function testExposedBlock() {
$block = $this
->createBlock('views_exposed_filter_block:test_exposed_block-page_1');
$dependencies = $block
->calculateDependencies()
->getDependencies();
$expected = [
'config' => [
'views.view.test_exposed_block',
],
'module' => [
'views',
],
'theme' => [
'stark',
],
];
$this
->assertSame($expected, $dependencies);
}