You are here

protected function EntityTestHalJsonInternalPropertyNormalizerTest::getExpectedCacheContexts in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonInternalPropertyNormalizerTest.php \Drupal\Tests\entity_test\Functional\Hal\EntityTestHalJsonInternalPropertyNormalizerTest::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/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonInternalPropertyNormalizerTest.php, line 94

Class

EntityTestHalJsonInternalPropertyNormalizerTest
Test that internal properties are not exposed in the 'hal_json' format.

Namespace

Drupal\Tests\entity_test\Functional\Hal

Code

protected function getExpectedCacheContexts() {
  return Cache::mergeContexts(parent::getExpectedCacheContexts(), [
    'request_format',
  ]);
}