function UserCacheTagsTest::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.

Overrides EntityCacheTagsTestBase::getAdditionalCacheTagsForEntityListing

File

core/modules/user/tests/src/Functional/UserCacheTagsTest.php, line 61

Class

UserCacheTagsTest
Tests the User entity's cache tags.

Namespace

Drupal\Tests\user\Functional

Code

protected function getAdditionalCacheTagsForEntityListing() : array {
  return [
    'user:0',
    'user:1',
  ];
}

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