You are here

public function DisplayPageTest::testDependencies in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/Plugin/DisplayPageTest.php \Drupal\views\Tests\Plugin\DisplayPageTest::testDependencies()

Tests the calculated dependencies for various views using Page displays.

File

core/modules/views/src/Tests/Plugin/DisplayPageTest.php, line 146
Contains \Drupal\views\Tests\Plugin\DisplayPageTest.

Class

DisplayPageTest
Tests the page display plugin.

Namespace

Drupal\views\Tests\Plugin

Code

public function testDependencies() {
  $view = Views::getView('test_page_display');
  $this
    ->assertIdentical([], $view
    ->getDependencies());
  $view = Views::getView('test_page_display_route');
  $expected = [
    'content' => [
      'StaticTest',
    ],
    'module' => [
      'views_test_data',
    ],
  ];
  $this
    ->assertIdentical($expected, $view
    ->getDependencies());
  $view = Views::getView('test_page_display_menu');
  $expected = [
    'config' => [
      'system.menu.admin',
      'system.menu.tools',
    ],
  ];
  $this
    ->assertIdentical($expected, $view
    ->getDependencies());
}