You are here

protected function EntityWithUriCacheTagsTestBase::getDefaultCacheContexts in Drupal 8

Same name in this branch
  1. 8 core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php \Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase::getDefaultCacheContexts()
  2. 8 core/modules/system/tests/src/Functional/Entity/EntityWithUriCacheTagsTestBase.php \Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase::getDefaultCacheContexts()

Gets the default cache contexts for rendered entities.

Return value

array The default cache contexts for rendered entities.

1 call to EntityWithUriCacheTagsTestBase::getDefaultCacheContexts()
EntityWithUriCacheTagsTestBase::testEntityUri in core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php
Tests cache tags presence and invalidation of the entity at its URI.

File

core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php, line 153

Class

EntityWithUriCacheTagsTestBase
Provides helper methods for Entity cache tags tests; for entities with URIs.

Namespace

Drupal\system\Tests\Entity

Code

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