function BlockResourceTestBase::getExpectedCacheTags

The expected cache tags for the GET/HEAD response of the test entity.

Return value

string[]

Overrides EntityResourceTestBase::getExpectedCacheTags

File

core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php, line 125

Class

BlockResourceTestBase

Namespace

Drupal\Tests\block\Functional\Rest

Code

protected function getExpectedCacheTags() {
  // Because the 'user.permissions' cache context is missing, the cache tag
  // for the anonymous user role is never added automatically.
  return array_values(array_diff(parent::getExpectedCacheTags(), [
    'config:user.role.anonymous',
  ]));
}

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