From fb3b6d13b8e9f594b248b0485af0c9429d3c7ee1 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 17 Jul 2008 21:10:39 +0000 Subject: - Patch #231190 by eli, mfb: page cache didn't work with HEAD requests. --- includes/tests/bootstrap.test | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'includes/tests') diff --git a/includes/tests/bootstrap.test b/includes/tests/bootstrap.test index 4b2cf3089..3bb197aae 100644 --- a/includes/tests/bootstrap.test +++ b/includes/tests/bootstrap.test @@ -81,3 +81,29 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase { ); } } + +class BootstrapPageCacheTestCase extends DrupalWebTestCase { + + /** + * Implementation of getInfo(). + */ + function getInfo() { + return array( + 'name' => t('Page cache test'), + 'description' => t('Enable the page cache, submit a HEAD request and examine headers.'), + 'group' => t('Bootstrap') + ); + } + + /** + * Enable cache and examine HTTP headers. + */ + function testPageCache() { + global $base_url; + variable_set('cache', 1); + // Retrieve the front page, which has already been cached by $this->curlConnect(); + $this->drupalHead($base_url); + $this->assertText('ETag: ', t('Verify presence of ETag header indicating that page caching is enabled.')); + } + +} -- cgit v1.2.3