protected function BlockContentResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in Drupal 10
Same name and namespace in other branches
- 8 core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php \Drupal\Tests\block_content\Functional\Rest\BlockContentResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
- 9 core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php \Drupal\Tests\block_content\Functional\Rest\BlockContentResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
The cacheability of unauthorized 'view' entity access.
Parameters
bool $is_authenticated: Whether the current request is authenticated or not. This matters for some entity access control handlers, but not for most.
Return value
\Drupal\Core\Cache\CacheableMetadata The expected cacheability.
Overrides EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability
File
- core/
modules/ block_content/ tests/ src/ Functional/ Rest/ BlockContentResourceTestBase.php, line 186
Class
- BlockContentResourceTestBase
- ResourceTestBase for BlockContent entity.
Namespace
Drupal\Tests\block_content\Functional\RestCode
protected function getExpectedUnauthorizedEntityAccessCacheability($is_authenticated) {
// @see \Drupal\block_content\BlockContentAccessControlHandler()
return parent::getExpectedUnauthorizedEntityAccessCacheability($is_authenticated)
->addCacheTags([
'block_content:1',
]);
}