protected function BlockContentResourceTestBase::getExpectedCacheContexts in Drupal 10
Same name and namespace in other branches
- 8 core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php \Drupal\Tests\block_content\Functional\Rest\BlockContentResourceTestBase::getExpectedCacheContexts()
- 9 core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php \Drupal\Tests\block_content\Functional\Rest\BlockContentResourceTestBase::getExpectedCacheContexts()
The expected cache contexts for the GET/HEAD response of the test entity.
Return value
string[]
Overrides EntityResourceTestBase::getExpectedCacheContexts
See also
::testGet
File
- core/
modules/ block_content/ tests/ src/ Functional/ Rest/ BlockContentResourceTestBase.php, line 202
Class
- BlockContentResourceTestBase
- ResourceTestBase 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']);
}