You are here

protected function EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity in Drupal 10

Same name and namespace in other branches
  1. 8 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.

File

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

Class

EntityCacheTagsTestBase
Provides helper methods for Entity cache tags tests.

Namespace

Drupal\Tests\system\Functional\Entity

Code

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