protected function ShortcutHalJsonAnonTest::getExpectedCacheContexts in Drupal 9
Same name and namespace in other branches
- 8 core/modules/shortcut/tests/src/Functional/Hal/ShortcutHalJsonAnonTest.php \Drupal\Tests\shortcut\Functional\Hal\ShortcutHalJsonAnonTest::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/ shortcut/ tests/ src/ Functional/ Hal/ ShortcutHalJsonAnonTest.php, line 74
Class
- ShortcutHalJsonAnonTest
- @group hal
Namespace
Drupal\Tests\shortcut\Functional\HalCode
protected function getExpectedCacheContexts() {
// The 'url.site' cache context is added for '_links' in the response.
return Cache::mergeContexts(parent::getExpectedCacheContexts(), [
'url.site',
]);
}