function BlockResourceTestBase::getExpectedUnauthorizedAccessCacheability
Same name in other branches
- 9 core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php \Drupal\Tests\block\Functional\Rest\BlockResourceTestBase::getExpectedUnauthorizedAccessCacheability()
- 10 core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php \Drupal\Tests\block\Functional\Rest\BlockResourceTestBase::getExpectedUnauthorizedAccessCacheability()
- 11.x 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
Namespace
Drupal\Tests\block\Functional\RestCode
protected function getExpectedUnauthorizedAccessCacheability() {
return (new CacheableMetadata())->setCacheTags([
'4xx-response',
'http_response',
])
->setCacheContexts([
'user.roles',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.