summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/Tests/NodeCacheTagsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/node/src/Tests/NodeCacheTagsTest.php')
-rw-r--r--core/modules/node/src/Tests/NodeCacheTagsTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/modules/node/src/Tests/NodeCacheTagsTest.php b/core/modules/node/src/Tests/NodeCacheTagsTest.php
index 990f00b..66932cc 100644
--- a/core/modules/node/src/Tests/NodeCacheTagsTest.php
+++ b/core/modules/node/src/Tests/NodeCacheTagsTest.php
@@ -41,6 +41,16 @@ class NodeCacheTagsTest extends EntityWithUriCacheTagsTestBase {
/**
* {@inheritdoc}
*/
+ protected function getDefaultCacheContexts() {
+ $defaults = parent::getDefaultCacheContexts();
+ // @see \Drupal\node\Controller\NodeViewController::view()
+ $defaults[] = 'user.roles:anonymous';
+ return $defaults;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
protected function getAdditionalCacheContextsForEntity(EntityInterface $entity) {
return ['timezone'];
}