summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/session.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/session.test')
-rw-r--r--modules/simpletest/tests/session.test16
1 files changed, 1 insertions, 15 deletions
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().