function AreaEntityTest::doTestCalculateDependencies

Same name in other branches
  1. 8.9.x core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php \Drupal\Tests\views\Kernel\Handler\AreaEntityTest::doTestCalculateDependencies()
  2. 10 core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php \Drupal\Tests\views\Kernel\Handler\AreaEntityTest::doTestCalculateDependencies()
  3. 11.x 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->assertEquals([
        'config' => [
            'block.block.test_block',
        ],
        'content' => [
            'entity_test:entity_test:aa0c61cb-b7bb-4795-972a-493dabcf529c',
        ],
        'module' => [
            'views_test_data',
        ],
    ], $dependencies);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.