protected function EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
- 9 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.
3 calls to EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
- BlockContentResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in core/
modules/ block_content/ tests/ src/ Functional/ Rest/ BlockContentResourceTestBase.php - The cacheability of unauthorized 'view' entity access.
- 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.
- TermResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in core/
modules/ taxonomy/ tests/ src/ Functional/ Rest/ TermResourceTestBase.php - The cacheability of unauthorized 'view' entity access.
4 methods override EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
- BlockContentResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in core/
modules/ block_content/ tests/ src/ Functional/ Rest/ BlockContentResourceTestBase.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.
- TermResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability in core/
modules/ taxonomy/ tests/ src/ Functional/ Rest/ TermResourceTestBase.php - The cacheability of unauthorized 'view' entity access.
File
- core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ EntityResourceTestBase.php, line 365
Class
- EntityResourceTestBase
- Even though there is the generic EntityResource, it's necessary for every entity type to have its own test, because they each have different fields, validation constraints, et cetera. It's not because the generic case works, that every case…
Namespace
Drupal\Tests\rest\Functional\EntityResourceCode
protected function getExpectedUnauthorizedEntityAccessCacheability($is_authenticated) {
return new CacheableMetadata();
}