You are here

protected function BlockContentResourceTestBase::getExpectedCacheContexts in Drupal 9

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

1 call to BlockContentResourceTestBase::getExpectedCacheContexts()
BlockContentHalJsonAnonTest::getExpectedCacheContexts in core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonAnonTest.php
The expected cache contexts for the GET/HEAD response of the test entity.
1 method overrides BlockContentResourceTestBase::getExpectedCacheContexts()
BlockContentHalJsonAnonTest::getExpectedCacheContexts in core/modules/block_content/tests/src/Functional/Hal/BlockContentHalJsonAnonTest.php
The expected cache contexts for the GET/HEAD response of the test entity.

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\Rest

Code

protected function getExpectedCacheContexts() {
  return Cache::mergeContexts([
    'url.site',
  ], $this->container
    ->getParameter('renderer.config')['required_cache_contexts']);
}