core/modules/smart_cache/src/Tests/SmartCacheIntegrationTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/modules/smart_cache/src/Tests/SmartCacheIntegrationTest.php b/core/modules/smart_cache/src/Tests/SmartCacheIntegrationTest.php index 7a4e9e3..ace479f 100644 --- a/core/modules/smart_cache/src/Tests/SmartCacheIntegrationTest.php +++ b/core/modules/smart_cache/src/Tests/SmartCacheIntegrationTest.php @@ -123,7 +123,7 @@ protected function assertSmartCache(Url $url, array $final_cache_contexts) { // - the required cache contexts; $cache_context_to_key_mapping['languages:language_interface'] = 'en'; $cache_context_to_key_mapping['theme'] = 'classy'; - $cache_context_to_key_mapping['user.permissions'] = 'ph.' . \Drupal::service('user_permissions_hash_generator')->generate(new AnonymousUserSession()); + $cache_context_to_key_mapping['user.permissions'] = \Drupal::service('user_permissions_hash_generator')->generate(new AnonymousUserSession()); // - the 'route' cache context added by SmartCache. $cache_context_to_key_mapping['route'] = $url->getRouteName() . hash('sha256', serialize($url->getRouteParameters())); @@ -131,7 +131,7 @@ protected function assertSmartCache(Url $url, array $final_cache_contexts) { $final_cache_contexts = Cache::mergeContexts(array_keys($cache_context_to_key_mapping)); // Assert SmartCache contexts item. - $cid_parts = [$url->getRouteName() . hash('sha256', serialize($url->getRouteParameters()))]; + $cid_parts = ['[route]=' . $url->getRouteName() . hash('sha256', serialize($url->getRouteParameters()))]; $cid = implode(':', $cid_parts); $cache_item = \Drupal::cache('smart_cache_contexts')->get($cid); $this->assertEqual($final_cache_contexts, array_values($cache_item->data)); @@ -139,7 +139,7 @@ protected function assertSmartCache(Url $url, array $final_cache_contexts) { // Assert SmartCache HTML response. $cid_parts = []; foreach ($final_cache_contexts as $cache_context_token) { - $cid_parts[] = $cache_context_to_key_mapping[$cache_context_token]; + $cid_parts[] = '[' . $cache_context_token . ']=' . $cache_context_to_key_mapping[$cache_context_token]; } $cid = implode(':', $cid_parts); $cache_item = \Drupal::cache('smart_cache_html')->get($cid);