Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php \Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity()
  2. 9 core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php \Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity()

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

Parameters

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

Return value

array An array of the additional cache tags.

See also

\Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase::createEntity()

2 calls to EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity()
EntityCacheTagsTestBase::testReferencedEntity in core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
Tests cache tags presence and invalidation of the entity when referenced.
EntityWithUriCacheTagsTestBase::testEntityUri in core/modules/system/tests/src/Functional/Entity/EntityWithUriCacheTagsTestBase.php
Tests cache tags presence and invalidation of the entity at its URI.
4 methods override EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity()
BlockContentCacheTagsTest::getAdditionalCacheTagsForEntity in core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
Each comment must have a comment body, which always has a text format.
CommentCacheTagsTest::getAdditionalCacheTagsForEntity in core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php
Each comment must have a comment body, which always has a text format.
MediaCacheTagsTest::getAdditionalCacheTagsForEntity in core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
Returns the additional (non-standard) cache tags for the tested entity.
NodeCacheTagsTest::getAdditionalCacheTagsForEntity in core/modules/node/tests/src/Functional/NodeCacheTagsTest.php
Each node must have an author.

File

core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php, line 157

Class

EntityCacheTagsTestBase
Provides helper methods for Entity cache tags tests.

Namespace

Drupal\Tests\system\Functional\Entity

Code

protected function getAdditionalCacheTagsForEntity(EntityInterface $entity) {
  return [];
}