core/modules/page_cache/src/Tests/PageCacheTest.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/modules/page_cache/src/Tests/PageCacheTest.php b/core/modules/page_cache/src/Tests/PageCacheTest.php index 72c89ff..0183b31 100644 --- a/core/modules/page_cache/src/Tests/PageCacheTest.php +++ b/core/modules/page_cache/src/Tests/PageCacheTest.php @@ -449,32 +449,32 @@ public function testCacheableResponseResponses() { $config->set('cache.page.max_age', 300); $config->save(); - // Try to fill the cache. + // GET a URL, which would be marked as a cache miss if it were cacheable. $this->drupalGet('/system-test/respond-reponse'); $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'), 'Drupal page cache header not found.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'must-revalidate, no-cache, post-check=0, pre-check=0, private', 'Cache-Control header was sent'); - // Still not cached, uncacheable response. + // GET it again, verify it's still not cached. $this->drupalGet('/system-test/respond-reponse'); $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'), 'Drupal page cache header not found.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'must-revalidate, no-cache, post-check=0, pre-check=0, private', 'Cache-Control header was sent'); - // Try to fill the cache. + // GET a URL, which would be marked as a cache miss if it were cacheable. $this->drupalGet('/system-test/respond-public-response'); $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'), 'Drupal page cache header not found.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'max-age=60, public', 'Cache-Control header was sent'); - // Still not cached, uncacheable response. + // GET it again, verify it's still not cached. $this->drupalGet('/system-test/respond-public-response'); $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'), 'Drupal page cache header not found.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'max-age=60, public', 'Cache-Control header was sent'); - // Try to fill the cache. + // GET a URL, which should be marked as a cache miss. $this->drupalGet('/system-test/respond-cacheable-reponse'); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Page was not cached.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'max-age=300, public', 'Cache-Control header was sent.'); - // Should be cached now. + // GET it again, it should now be a cache hit. $this->drupalGet('/system-test/respond-cacheable-reponse'); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Page was cached.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'max-age=300, public', 'Cache-Control header was sent.'); @@ -484,7 +484,7 @@ public function testCacheableResponseResponses() { $this->container->get('module_installer') ->uninstall(['page_cache']); - // Try to fill the cache. + // GET a URL that was cached by Page Cache before, it should not be now. $this->drupalGet('/respond-cacheable-reponse'); $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'), 'Drupal page cache header not found.'); }