Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / toolbar / tests / src / Functional / ToolbarCacheContextsTest.php
index 26454762ea284310d0b502b527a607f10562468d..0232545473217c8d7fa4f5c3f34db24161b86fac 100644 (file)
@@ -58,6 +58,18 @@ class ToolbarCacheContextsTest extends BrowserTestBase {
     $this->adminUser2 = $this->drupalCreateUser($this->perms);
   }
 
+  /**
+   * Tests toolbar cache integration.
+   */
+  public function testCacheIntegration() {
+    $this->installExtraModules(['dynamic_page_cache']);
+    $this->drupalLogin($this->adminUser);
+    $this->drupalGet('test-page');
+    $this->assertSame('MISS', $this->getSession()->getResponseHeader('X-Drupal-Dynamic-Cache'));
+    $this->drupalGet('test-page');
+    $this->assertSame('HIT', $this->getSession()->getResponseHeader('X-Drupal-Dynamic-Cache'));
+  }
+
   /**
    * Tests toolbar cache contexts.
    */