function EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity
Same name in other branches
- 8.9.x core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php \Drupal\system\Tests\Entity\EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity()
- 8.9.x core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php \Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity()
- 10 core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php \Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity()
- 11.x 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 173
Class
- EntityCacheTagsTestBase
- Provides helper methods for Entity cache tags tests.
Namespace
Drupal\Tests\system\Functional\EntityCode
protected function getAdditionalCacheTagsForEntity(EntityInterface $entity) {
return [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.