protected function ResourceTestBase::getExpectedUnauthorizedAccessCacheability in JSON:API 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getExpectedUnauthorizedAccessCacheability()
5 methods override ResourceTestBase::getExpectedUnauthorizedAccessCacheability()
- BlockContentTest::getExpectedUnauthorizedAccessCacheability in tests/
src/ Functional/ BlockContentTest.php - BlockTest::getExpectedUnauthorizedAccessCacheability in tests/
src/ Functional/ BlockTest.php - CommentTest::getExpectedUnauthorizedAccessCacheability in tests/
src/ Functional/ CommentTest.php - MediaTest::getExpectedUnauthorizedAccessCacheability in tests/
src/ Functional/ MediaTest.php - SearchPageTest::getExpectedUnauthorizedAccessCacheability in tests/
src/ Functional/ SearchPageTest.php
File
- tests/
src/ Functional/ ResourceTestBase.php, line 415
Class
- ResourceTestBase
- Subclass this for every JSON API resource type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function getExpectedUnauthorizedAccessCacheability() {
return (new CacheableMetadata())
->setCacheTags([
'4xx-response',
'http_response',
])
->setCacheContexts([
'user.permissions',
]);
}