You are here

protected function BlockTest::getExpectedUnauthorizedAccessCacheability in JSON:API 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/BlockTest.php \Drupal\Tests\jsonapi\Functional\BlockTest::getExpectedUnauthorizedAccessCacheability()

Overrides ResourceTestBase::getExpectedUnauthorizedAccessCacheability

File

tests/src/Functional/BlockTest.php, line 170

Class

BlockTest
JSON API integration test for the "Block" config entity type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

protected function getExpectedUnauthorizedAccessCacheability() {

  // @see \Drupal\block\BlockAccessControlHandler::checkAccess()
  return parent::getExpectedUnauthorizedAccessCacheability()
    ->setCacheTags([
    '4xx-response',
    'config:block.block.llama',
    'http_response',
    'user:2',
  ])
    ->setCacheContexts([
    'user.roles',
  ]);
}