function BlockContentResourceTestBase::getExpectedCacheContexts
The expected cache contexts for the GET/HEAD response of the test entity.
Return value
string[] The expected cache contexts.
Overrides EntityResourceTestBase::getExpectedCacheContexts
File
-
core/
modules/ block_content/ tests/ src/ Functional/ Rest/ BlockContentResourceTestBase.php, line 235
Class
- BlockContentResourceTestBase
- Resource test base for BlockContent entity.
Namespace
Drupal\Tests\block_content\Functional\RestCode
protected function getExpectedCacheContexts() {
return Cache::mergeContexts([
'url.site',
], $this->container
->getParameter('renderer.config')['required_cache_contexts']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.