diff --git a/core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php b/core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php index 5b8db03..f46ad04 100644 --- a/core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php +++ b/core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php @@ -417,7 +417,9 @@ public function testReferencedEntity() { $access_cache_contexts = $this->getAccessCacheContextsForEntity($this->entity); $redirected_cid = NULL; if (count($access_cache_contexts)) { - $redirected_cid = $this->createCacheId($cache_keys, Cache::mergeContexts($entity_cache_contexts, $this->getAdditionalCacheContextsForEntity($this->referencingEntity), $access_cache_contexts)); + $contexts = Cache::mergeContexts($entity_cache_contexts, $this->getAdditionalCacheContextsForEntity($this->referencingEntity)); + $contexts = Cache::mergeContexts($contexts, $access_cache_contexts); + $redirected_cid = $this->createCacheId($cache_keys, $contexts); } $this->verifyRenderCache($cid, $referencing_entity_cache_tags, $redirected_cid);