You are here

public function AreaEntityTest::doTestCalculateDependencies in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php \Drupal\Tests\views\Kernel\Handler\AreaEntityTest::doTestCalculateDependencies()

Tests the calculation of the rendered dependencies.

1 call to AreaEntityTest::doTestCalculateDependencies()
AreaEntityTest::testEntityArea in core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php
Tests the area handler.

File

core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php, line 190

Class

AreaEntityTest
Tests the generic entity area handler.

Namespace

Drupal\Tests\views\Kernel\Handler

Code

public function doTestCalculateDependencies() {
  $view = View::load('test_entity_area');
  $dependencies = $view
    ->calculateDependencies()
    ->getDependencies();

  // Ensure that both config and content entity dependencies are calculated.
  $this
    ->assertEqual([
    'config' => [
      'block.block.test_block',
    ],
    'content' => [
      'entity_test:entity_test:aa0c61cb-b7bb-4795-972a-493dabcf529c',
    ],
    'module' => [
      'views_test_data',
    ],
  ], $dependencies);
}