fixed statistics logging test, partialy fixed page caching and session tests

8.0.x
Bram Goffings 2012-01-09 12:09:13 +01:00 committed by Greg Dunlap
parent 4a8adb2ad9
commit 0734324871
3 changed files with 17 additions and 6 deletions

View File

@ -116,7 +116,9 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
* Test support for requests containing If-Modified-Since and If-None-Match headers.
*/
function testConditionalRequests() {
variable_set('cache', 1);
$config = config('system.performance');
$config->set('cache', 1);
$config->save();
// Fill the cache.
$this->drupalGet('');
@ -154,7 +156,9 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
* Test cache headers.
*/
function testPageCache() {
variable_set('cache', 1);
$config = config('system.performance');
$config->set('cache', 1);
$config->save();
// Fill the cache.
$this->drupalGet('system-test/set-header', array('query' => array('name' => 'Foo', 'value' => 'bar')));
@ -198,7 +202,9 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
* mod_deflate Apache module.
*/
function testPageCompression() {
variable_set('cache', 1);
$config = config('system.performance');
$config->set('cache', 1);
$config->save();
// Fill the cache and verify that output is compressed.
$this->drupalGet('', array(), array('Accept-Encoding: gzip,deflate'));

View File

@ -139,7 +139,10 @@ class SessionTestCase extends DrupalWebTestCase {
$this->assertSessionEmpty(TRUE);
// The same behavior is expected when caching is enabled.
variable_set('cache', 1);
$config = config('system.performance');
$config->set('cache', 1);
$config->save();
$this->drupalGet('');
$this->assertSessionCookie(FALSE);
$this->assertSessionEmpty(TRUE);
@ -455,7 +458,7 @@ class SessionHttpsTestCase extends DrupalWebTestCase {
}
}
// Test that session data saved before login is not available using the
// Test that session data saved before login is not available using the
// pre-login anonymous cookie.
$this->cookies = array();
$this->drupalGet('session-test/get', array('Cookie: ' . $anonymous_cookie));

View File

@ -69,7 +69,9 @@ class StatisticsLoggingTestCase extends DrupalWebTestCase {
$this->node = $this->drupalCreateNode(array('title' => $this->randomName(255), 'uid' => $this->auth_user->uid));
// Enable page caching.
variable_set('cache', TRUE);
$config = config('system.performance');
$config->set('cache', 1);
$config->save();
// Enable access logging.
variable_set('statistics_enable_access_log', 1);