fixed statistics logging test, partialy fixed page caching and session tests
parent
4a8adb2ad9
commit
0734324871
|
@ -116,7 +116,9 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
|
||||||
* Test support for requests containing If-Modified-Since and If-None-Match headers.
|
* Test support for requests containing If-Modified-Since and If-None-Match headers.
|
||||||
*/
|
*/
|
||||||
function testConditionalRequests() {
|
function testConditionalRequests() {
|
||||||
variable_set('cache', 1);
|
$config = config('system.performance');
|
||||||
|
$config->set('cache', 1);
|
||||||
|
$config->save();
|
||||||
|
|
||||||
// Fill the cache.
|
// Fill the cache.
|
||||||
$this->drupalGet('');
|
$this->drupalGet('');
|
||||||
|
@ -154,7 +156,9 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
|
||||||
* Test cache headers.
|
* Test cache headers.
|
||||||
*/
|
*/
|
||||||
function testPageCache() {
|
function testPageCache() {
|
||||||
variable_set('cache', 1);
|
$config = config('system.performance');
|
||||||
|
$config->set('cache', 1);
|
||||||
|
$config->save();
|
||||||
|
|
||||||
// Fill the cache.
|
// Fill the cache.
|
||||||
$this->drupalGet('system-test/set-header', array('query' => array('name' => 'Foo', 'value' => 'bar')));
|
$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.
|
* mod_deflate Apache module.
|
||||||
*/
|
*/
|
||||||
function testPageCompression() {
|
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.
|
// Fill the cache and verify that output is compressed.
|
||||||
$this->drupalGet('', array(), array('Accept-Encoding: gzip,deflate'));
|
$this->drupalGet('', array(), array('Accept-Encoding: gzip,deflate'));
|
||||||
|
|
|
@ -139,7 +139,10 @@ class SessionTestCase extends DrupalWebTestCase {
|
||||||
$this->assertSessionEmpty(TRUE);
|
$this->assertSessionEmpty(TRUE);
|
||||||
|
|
||||||
// The same behavior is expected when caching is enabled.
|
// 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->drupalGet('');
|
||||||
$this->assertSessionCookie(FALSE);
|
$this->assertSessionCookie(FALSE);
|
||||||
$this->assertSessionEmpty(TRUE);
|
$this->assertSessionEmpty(TRUE);
|
||||||
|
|
|
@ -69,7 +69,9 @@ class StatisticsLoggingTestCase extends DrupalWebTestCase {
|
||||||
$this->node = $this->drupalCreateNode(array('title' => $this->randomName(255), 'uid' => $this->auth_user->uid));
|
$this->node = $this->drupalCreateNode(array('title' => $this->randomName(255), 'uid' => $this->auth_user->uid));
|
||||||
|
|
||||||
// Enable page caching.
|
// Enable page caching.
|
||||||
variable_set('cache', TRUE);
|
$config = config('system.performance');
|
||||||
|
$config->set('cache', 1);
|
||||||
|
$config->save();
|
||||||
|
|
||||||
// Enable access logging.
|
// Enable access logging.
|
||||||
variable_set('statistics_enable_access_log', 1);
|
variable_set('statistics_enable_access_log', 1);
|
||||||
|
|
Loading…
Reference in New Issue