You are here

protected function BlockResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in Drupal 10

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

File

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

Class

BlockResourceTestBase

Namespace

Drupal\Tests\block\Functional\Rest

Code

protected function getExpectedUnauthorizedEntityAccessCacheability($is_authenticated) {

  // @see \Drupal\block\BlockAccessControlHandler::checkAccess()
  return parent::getExpectedUnauthorizedEntityAccessCacheability($is_authenticated)
    ->addCacheTags([
    'config:block.block.llama',
    $is_authenticated ? 'user:2' : 'user:0',
  ]);
}