function CommentCacheTagsTest::getAdditionalCacheContextsForEntity

Same name and namespace in other branches
  1. 11.x core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php \Drupal\Tests\comment\Functional\CommentCacheTagsTest::getAdditionalCacheContextsForEntity()
  2. 10 core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php \Drupal\Tests\comment\Functional\CommentCacheTagsTest::getAdditionalCacheContextsForEntity()
  3. 9 core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php \Drupal\Tests\comment\Functional\CommentCacheTagsTest::getAdditionalCacheContextsForEntity()
  4. 8.9.x core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php \Drupal\Tests\comment\Functional\CommentCacheTagsTest::getAdditionalCacheContextsForEntity()

Returns the additional (non-standard) cache contexts for the tested entity.

Only list cache contexts that aren't part of the required cache contexts.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to be tested, as created by createEntity().

Return value

string[] An array of the additional cache contexts.

Overrides EntityCacheTagsTestBase::getAdditionalCacheContextsForEntity

File

core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php, line 150

Class

CommentCacheTagsTest
Tests the Comment entity's cache tags.

Namespace

Drupal\Tests\comment\Functional

Code

protected function getAdditionalCacheContextsForEntity(EntityInterface $entity) : array {
  return [];
}

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