X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fsrc%2FFunctional%2FCache%2FPageCacheTagsTestBase.php;h=e7078991613febffba6c73ddf55f8189ccb4a092;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=39a514fa3b2ac2a6a055a9ad533cdc31bec96eb5;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php b/web/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php index 39a514fa3..e70789916 100644 --- a/web/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php +++ b/web/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php @@ -4,7 +4,7 @@ namespace Drupal\Tests\system\Functional\Cache; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; -use Drupal\Component\Utility\SafeMarkup; +use Drupal\Component\Render\FormattableMarkup; /** * Provides helper methods for page cache tags tests. @@ -44,14 +44,14 @@ abstract class PageCacheTagsTestBase extends BrowserTestBase { */ protected function verifyPageCache(Url $url, $hit_or_miss, $tags = FALSE) { $this->drupalGet($url); - $message = SafeMarkup::format('Page cache @hit_or_miss for %path.', ['@hit_or_miss' => $hit_or_miss, '%path' => $url->toString()]); + $message = new FormattableMarkup('Page cache @hit_or_miss for %path.', ['@hit_or_miss' => $hit_or_miss, '%path' => $url->toString()]); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), $hit_or_miss, $message); if ($hit_or_miss === 'HIT' && is_array($tags)) { $absolute_url = $url->setAbsolute()->toString(); $cid_parts = [$absolute_url, 'html']; $cid = implode(':', $cid_parts); - $cache_entry = \Drupal::cache('render')->get($cid); + $cache_entry = \Drupal::cache('page')->get($cid); sort($cache_entry->tags); $tags = array_unique($tags); sort($tags);