You are here

protected function BlockContentHalJsonAnonTest::getExpectedCacheContexts in Drupal 8

Same name and namespace in other branches
  1. 9 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\Hal

Code

protected function getExpectedCacheContexts() {

  // The 'url.site' cache context is added for '_links' in the response.
  return Cache::mergeTags(parent::getExpectedCacheContexts(), [
    'url.site',
  ]);
}