function EntityListBuilderTest::testCacheTags

Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php \Drupal\Tests\system\Functional\Entity\EntityListBuilderTest::testCacheTags()
  2. 10 core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php \Drupal\Tests\system\Functional\Entity\EntityListBuilderTest::testCacheTags()
  3. 11.x core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php \Drupal\Tests\system\Functional\Entity\EntityListBuilderTest::testCacheTags()

Tests if the list cache tags are set.

File

core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php, line 76

Class

EntityListBuilderTest
Tests entity list builder functionality.

Namespace

Drupal\Tests\system\Functional\Entity

Code

public function testCacheTags() {
    $this->drupalGet('entity_test/list');
    $this->assertSession()
        ->responseHeaderContains('X-Drupal-Cache-Tags', 'entity_test_list');
}

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