Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / system / tests / src / Functional / Cache / PageCacheTagsTestBase.php
index 39a514fa3b2ac2a6a055a9ad533cdc31bec96eb5..e7078991613febffba6c73ddf55f8189ccb4a092 100644 (file)
@@ -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);