You are here

protected function BlockResourceTestBase::getExpectedCacheTags in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php \Drupal\Tests\block\Functional\Rest\BlockResourceTestBase::getExpectedCacheTags()

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

Return value

string[]

Overrides EntityResourceTestBase::getExpectedCacheTags

See also

::testGet

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',
  ]));
}