function SearchPageResourceTestBase::getExpectedCacheContexts

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

Return value

string[] The expected cache contexts.

Overrides EntityResourceTestBase::getExpectedCacheContexts

File

core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php, line 96

Class

SearchPageResourceTestBase
Base class for Search page tests.

Namespace

Drupal\Tests\search\Functional\Rest

Code

protected function getExpectedCacheContexts() {
  // 'session' is bubbled by URL generation for CSRF-protected routes
  // referenced in the response normalization.
  return array_merge([
    'session',
  ], parent::getExpectedCacheContexts());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.