You are here

protected function FileResourceTestBase::getExpectedCacheContexts in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php \Drupal\Tests\file\Functional\Rest\FileResourceTestBase::getExpectedCacheContexts()
  2. 10 core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php \Drupal\Tests\file\Functional\Rest\FileResourceTestBase::getExpectedCacheContexts()

The expected cache contexts for the GET/HEAD response of the test entity.

Return value

string[]

Overrides EntityResourceTestBase::getExpectedCacheContexts

See also

::testGet

1 method overrides FileResourceTestBase::getExpectedCacheContexts()
FileHalJsonAnonTest::getExpectedCacheContexts in core/modules/file/tests/src/Functional/Hal/FileHalJsonAnonTest.php
The expected cache contexts for the GET/HEAD response of the test entity.

File

core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php, line 188

Class

FileResourceTestBase

Namespace

Drupal\Tests\file\Functional\Rest

Code

protected function getExpectedCacheContexts() {
  return [
    'user.permissions',
  ];
}