public function BlockDependenciesTest::testViewsBlock in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/Plugin/BlockDependenciesTest.php \Drupal\views\Tests\Plugin\BlockDependenciesTest::testViewsBlock()
Tests that exposed filter blocks have the correct dependencies.
See also
\Drupal\views\Plugin\Derivative\ViewsBlock::getDerivativeDefinitions()
File
- core/
modules/ views/ src/ Tests/ Plugin/ BlockDependenciesTest.php, line 54 - Contains \Drupal\views\Tests\Plugin\BlockDependenciesTest.
Class
- BlockDependenciesTest
- Tests views block config dependencies functionality.
Namespace
Drupal\views\Tests\PluginCode
public function testViewsBlock() {
$block = $this
->createBlock('views_block:content_recent-block_1');
$dependencies = $block
->calculateDependencies()
->getDependencies();
$expected = array(
'config' => array(
'views.view.content_recent',
),
'module' => array(
'views',
),
'theme' => array(
'stark',
),
);
$this
->assertIdentical($expected, $dependencies);
}