You are here

protected function BlockResourceTestBase::getExpectedUnauthorizedAccessCacheability 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::getExpectedUnauthorizedAccessCacheability()
  2. 10 core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php \Drupal\Tests\block\Functional\Rest\BlockResourceTestBase::getExpectedUnauthorizedAccessCacheability()

@todo Fix this in https://www.drupal.org/node/2820315.

Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessCacheability

File

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

Class

BlockResourceTestBase

Namespace

Drupal\Tests\block\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessCacheability() {
  return (new CacheableMetadata())
    ->setCacheTags([
    '4xx-response',
    'http_response',
  ])
    ->setCacheContexts([
    'user.roles',
  ]);
}