function EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability
Same name in other branches
- 8.9.x core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
- 10 core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
- 11.x core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::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.
1 call to EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
- EntityResourceTestBase::testGet in core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ EntityResourceTestBase.php - Tests a GET request for an entity, plus edge cases to ensure good DX.
7 methods override EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
- BlockContentResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in core/
modules/ block_content/ tests/ src/ Functional/ Rest/ BlockContentResourceTestBase.php - The cacheability of unauthorized 'view' entity access.
- BlockResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in core/
modules/ block/ tests/ src/ Functional/ Rest/ BlockResourceTestBase.php - The cacheability of unauthorized 'view' entity access.
- CommentResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php - The cacheability of unauthorized 'view' entity access.
- MediaResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in core/
modules/ media/ tests/ src/ Functional/ Rest/ MediaResourceTestBase.php - The cacheability of unauthorized 'view' entity access.
- SearchPageResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in core/
modules/ search/ tests/ src/ Functional/ Rest/ SearchPageResourceTestBase.php - The cacheability of unauthorized 'view' entity access.
File
-
core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ EntityResourceTestBase.php, line 369
Class
- EntityResourceTestBase
- Defines a base class for testing all entity resources.
Namespace
Drupal\Tests\rest\Functional\EntityResourceCode
protected function getExpectedUnauthorizedEntityAccessCacheability($is_authenticated) {
return new CacheableMetadata();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.