protected function BlockContentHalJsonAnonTest::getExpectedCacheContexts in Drupal 9
Same name and namespace in other branches
- 8 core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonAnonTest.php \Drupal\Tests\block_content\Functional\Hal\BlockContentHalJsonAnonTest::getExpectedCacheContexts()
The expected cache contexts for the GET/HEAD response of the test entity.
Return value
string[]
Overrides BlockContentResourceTestBase::getExpectedCacheContexts
See also
::testGet
File
- core/
modules/ block_content/ tests/ src/ Functional/ Hal/ BlockContentHalJsonAnonTest.php, line 74
Class
- BlockContentHalJsonAnonTest
- @group hal
Namespace
Drupal\Tests\block_content\Functional\HalCode
protected function getExpectedCacheContexts() {
// The 'url.site' cache context is added for '_links' in the response.
return Cache::mergeTags(parent::getExpectedCacheContexts(), [
'url.site',
]);
}