diff --git a/core/modules/simpletest/tests/bootstrap.test b/core/modules/simpletest/tests/bootstrap.test index 88f3d41feca..fee8fcc0dd1 100644 --- a/core/modules/simpletest/tests/bootstrap.test +++ b/core/modules/simpletest/tests/bootstrap.test @@ -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')); diff --git a/core/modules/simpletest/tests/session.test b/core/modules/simpletest/tests/session.test index 846f6d314c7..cca23bad6ea 100644 --- a/core/modules/simpletest/tests/session.test +++ b/core/modules/simpletest/tests/session.test @@ -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)); diff --git a/core/modules/statistics/statistics.test b/core/modules/statistics/statistics.test index 592f1653c94..7fac22c3535 100644 --- a/core/modules/statistics/statistics.test +++ b/core/modules/statistics/statistics.test @@ -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);