function CacheableMetadataCalculationTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php \Drupal\Tests\views\Kernel\CacheableMetadataCalculationTest::setUp()
  2. 10 core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php \Drupal\Tests\views\Kernel\CacheableMetadataCalculationTest::setUp()
  3. 11.x core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php \Drupal\Tests\views\Kernel\CacheableMetadataCalculationTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php, line 46

Class

CacheableMetadataCalculationTest
Tests that cacheability metadata is only calculated when needed.

Namespace

Drupal\Tests\views\Kernel

Code

protected function setUp() {
    parent::setUp();
    $this->installConfig([
        'views',
    ]);
    $this->installEntitySchema('user');
    $this->state = $this->container
        ->get('state');
    $this->entityTypeManager = $this->container
        ->get('entity_type.manager');
}

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