summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r--modules/simpletest/tests/bootstrap.test2
-rw-r--r--modules/simpletest/tests/session.test16
2 files changed, 2 insertions, 16 deletions
diff --git a/modules/simpletest/tests/bootstrap.test b/modules/simpletest/tests/bootstrap.test
index f3fbb1620..ec5a598d8 100644
--- a/modules/simpletest/tests/bootstrap.test
+++ b/modules/simpletest/tests/bootstrap.test
@@ -104,7 +104,7 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
$this->drupalGet($base_url);
$this->drupalHead($base_url);
- $this->assertText('ETag: ', t('Verify presence of ETag header indicating that page caching is enabled.'));
+ $this->assertTrue($this->drupalGetHeader('ETag') !== FALSE, t('Verify presence of ETag header indicating that page caching is enabled.'));
}
}
diff --git a/modules/simpletest/tests/session.test b/modules/simpletest/tests/session.test
index 082345e64..85a1bb80d 100644
--- a/modules/simpletest/tests/session.test
+++ b/modules/simpletest/tests/session.test
@@ -7,8 +7,6 @@
*/
class SessionTestCase extends DrupalWebTestCase {
- protected $saved_cookie;
-
function getInfo() {
return array(
'name' => t('Session tests'),
@@ -22,18 +20,6 @@ class SessionTestCase extends DrupalWebTestCase {
}
/**
- * Implementation of curlHeaderCallback().
- */
- protected function curlHeaderCallback($ch, $header) {
- // Look for a Set-Cookie header.
- if (preg_match('/^Set-Cookie.+$/i', $header, $matches)) {
- $this->saved_cookie = $header;
- }
-
- return parent::curlHeaderCallback($ch, $header);
- }
-
- /**
* Tests for drupal_save_session() and drupal_session_regenerate().
*/
function testSessionSaveRegenerate() {
@@ -49,7 +35,7 @@ class SessionTestCase extends DrupalWebTestCase {
$this->sessionReset($user->uid);
// Make sure the session cookie is set as HttpOnly.
$this->drupalLogin($user);
- $this->assertTrue(preg_match('/HttpOnly/i', $this->saved_cookie), t('Session cookie is set as HttpOnly.'));
+ $this->assertTrue(preg_match('/HttpOnly/i', $this->drupalGetHeader('Set-Cookie', TRUE)), t('Session cookie is set as HttpOnly.'));
$this->drupalLogout();
// Verify that the session is regenerated if a module calls exit
// in hook_user_login().