function EntityCacheTagsTestBase::getAdditionalCacheTagsForEntityListing

Same name in other branches
  1. 8.9.x core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php \Drupal\system\Tests\Entity\EntityCacheTagsTestBase::getAdditionalCacheTagsForEntityListing()
  2. 8.9.x core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php \Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase::getAdditionalCacheTagsForEntityListing()
  3. 10 core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php \Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase::getAdditionalCacheTagsForEntityListing()
  4. 11.x core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php \Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase::getAdditionalCacheTagsForEntityListing()

Returns the additional cache tags for the tested entity's listing by type.

Necessary when there are unavoidable default entities of this type, e.g. the anonymous and administrator User entities always exist.

Return value

array An array of the additional cache tags.

1 call to EntityCacheTagsTestBase::getAdditionalCacheTagsForEntityListing()
EntityCacheTagsTestBase::testReferencedEntity in core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
Tests cache tags presence and invalidation of the entity when referenced.
1 method overrides EntityCacheTagsTestBase::getAdditionalCacheTagsForEntityListing()
UserCacheTagsTest::getAdditionalCacheTagsForEntityListing in core/modules/user/tests/src/Functional/UserCacheTagsTest.php
Returns the additional cache tags for the tested entity's listing by type.

File

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

Class

EntityCacheTagsTestBase
Provides helper methods for Entity cache tags tests.

Namespace

Drupal\Tests\system\Functional\Entity

Code

protected function getAdditionalCacheTagsForEntityListing() {
    return [];
}

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