X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ftoolbar%2Ftests%2Fsrc%2FFunctional%2FToolbarCacheContextsTest.php;fp=web%2Fcore%2Fmodules%2Ftoolbar%2Ftests%2Fsrc%2FFunctional%2FToolbarCacheContextsTest.php;h=0232545473217c8d7fa4f5c3f34db24161b86fac;hp=26454762ea284310d0b502b527a607f10562468d;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php b/web/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php index 26454762e..023254547 100644 --- a/web/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php +++ b/web/core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php @@ -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. */