function EntityResourceTestBase::getExpectedCacheContexts
Same name and namespace in other branches
- 11.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()
- 8.9.x 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
5 methods override EntityResourceTestBase::getExpectedCacheContexts()
- 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.
- ContentLanguageSettingsResourceTestBase::getExpectedCacheContexts in core/
modules/ language/ tests/ src/ Functional/ Rest/ ContentLanguageSettingsResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- EditorResourceTestBase::getExpectedCacheContexts in core/
modules/ editor/ tests/ src/ Functional/ Rest/ EditorResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- FieldConfigResourceTestBase::getExpectedCacheContexts in core/
modules/ field/ tests/ src/ Functional/ Rest/ FieldConfigResourceTestBase.php - The expected cache contexts for the GET/HEAD response of the test entity.
- FileResourceTestBase::getExpectedCacheContexts in core/
modules/ file/ tests/ src/ Functional/ Rest/ FileResourceTestBase.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 398
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.