function EntityResourceTestBase::getExpectedCacheContexts
Same name in other branches
- 9 core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getExpectedCacheContexts()
- 8.9.x core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getExpectedCacheContexts()
- 10 core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getExpectedCacheContexts()
The expected cache contexts for the GET/HEAD response of the test entity.
Return value
string[]
See also
::testGet
6 calls to EntityResourceTestBase::getExpectedCacheContexts()
- CommentResourceTestBase::getExpectedCacheContexts in core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- ConfigurableLanguageResourceTestBase::getExpectedCacheContexts in core/
modules/ language/ tests/ src/ Functional/ Rest/ ConfigurableLanguageResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- 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.
- EntityTestComputedFieldNormalizerTest::getExpectedCacheContexts in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestComputedFieldNormalizerTest.php - The expected cache contexts for the GET/HEAD response of the test entity.
- EntityTestJsonInternalPropertyNormalizerTest::getExpectedCacheContexts in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestJsonInternalPropertyNormalizerTest.php - The expected cache contexts for the GET/HEAD response of the test entity.
25 methods override EntityResourceTestBase::getExpectedCacheContexts()
- ActionResourceTestBase::getExpectedCacheContexts in core/
modules/ system/ tests/ src/ Functional/ Rest/ ActionResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- BaseFieldOverrideResourceTestBase::getExpectedCacheContexts in core/
tests/ Drupal/ FunctionalTests/ Rest/ BaseFieldOverrideResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- BlockContentResourceTestBase::getExpectedCacheContexts in core/
modules/ block_content/ tests/ src/ Functional/ Rest/ BlockContentResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- BlockResourceTestBase::getExpectedCacheContexts in core/
modules/ block/ tests/ src/ Functional/ Rest/ BlockResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- CommentResourceTestBase::getExpectedCacheContexts in core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
File
-
core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ EntityResourceTestBase.php, line 399
Class
- EntityResourceTestBase
- Defines a base class for testing all entity resources.
Namespace
Drupal\Tests\rest\Functional\EntityResourceCode
protected function getExpectedCacheContexts() {
return [
'url.site',
'user.permissions',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.