function CommentCacheTagsTest::getDefaultCacheContexts

Same name and namespace in other branches
  1. 9 core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php \Drupal\Tests\comment\Functional\CommentCacheTagsTest::getDefaultCacheContexts()
  2. 10 core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php \Drupal\Tests\comment\Functional\CommentCacheTagsTest::getDefaultCacheContexts()

Gets the default cache contexts for rendered entities.

Return value

array The default cache contexts for rendered entities.

Overrides EntityWithUriCacheTagsTestBase::getDefaultCacheContexts

File

core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php, line 170

Class

CommentCacheTagsTest
Tests the Comment entity's cache tags.

Namespace

Drupal\Tests\comment\Functional

Code

protected function getDefaultCacheContexts() : array {
  return [
    'languages:' . LanguageInterface::TYPE_INTERFACE,
    'theme',
    'user.permissions',
  ];
}

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