protected function TermResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in Drupal 10
Same name and namespace in other branches
- 8 core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php \Drupal\Tests\taxonomy\Functional\Rest\TermResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
- 9 core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php \Drupal\Tests\taxonomy\Functional\Rest\TermResourceTestBase::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/ taxonomy/ tests/ src/ Functional/ Rest/ TermResourceTestBase.php, line 380
Class
Namespace
Drupal\Tests\taxonomy\Functional\RestCode
protected function getExpectedUnauthorizedEntityAccessCacheability($is_authenticated) {
// @see \Drupal\taxonomy\TermAccessControlHandler::checkAccess()
return parent::getExpectedUnauthorizedEntityAccessCacheability($is_authenticated)
->addCacheTags([
'taxonomy_term:1',
]);
}