function CommentResourceTestBase::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/comment/tests/src/Functional/Rest/CommentResourceTestBase.php, line 294

Class

CommentResourceTestBase
Resource test base for the comment entity.

Namespace

Drupal\Tests\comment\Functional\Rest

Code

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

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