function EntityListBuilderTest::testCacheTags

Same name and namespace in other branches
  1. 10 core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php \Drupal\Tests\system\Functional\Entity\EntityListBuilderTest::testCacheTags()
  2. 9 core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php \Drupal\Tests\system\Functional\Entity\EntityListBuilderTest::testCacheTags()
  3. 8.9.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 86

Class

EntityListBuilderTest
Tests entity list builder functionality.

Namespace

Drupal\Tests\system\Functional\Entity

Code

public function testCacheTags() : void {
  $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.