public function DisplayPageTest::testDependencies in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php \Drupal\Tests\views\Kernel\Plugin\DisplayPageTest::testDependencies()
Tests the calculated dependencies for various views using Page displays.
File
- core/
modules/ views/ tests/ src/ Kernel/ Plugin/ DisplayPageTest.php, line 133
Class
- DisplayPageTest
- Tests the page display plugin.
Namespace
Drupal\Tests\views\Kernel\PluginCode
public function testDependencies() {
$view = Views::getView('test_page_display');
$this
->assertSame([
'module' => [
'views_test_data',
],
], $view
->getDependencies());
$view = Views::getView('test_page_display_route');
$expected = [
'content' => [
'StaticTest',
],
'module' => [
'views_test_data',
],
];
$this
->assertSame($expected, $view
->getDependencies());
$view = Views::getView('test_page_display_menu');
$expected = [
'config' => [
'system.menu.admin',
'system.menu.tools',
],
'module' => [
'views_test_data',
],
];
$this
->assertSame($expected, $view
->getDependencies());
}