summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-03-23 01:00:20 -0600
committerwebchick <webchick@24967.no-reply.drupal.org>2012-03-23 01:00:20 -0600
commit51d0867d8418600ba5f6ff3a835c68b8a72ba890 (patch)
tree684dd65b2b87e40e0bf40523a8673f2b20b14d43 /modules/simpletest
parentea8e74bbd494ce2f8d6e5bf38e1596fe014a1b85 (diff)
downloadbrdo-51d0867d8418600ba5f6ff3a835c68b8a72ba890.tar.gz
brdo-51d0867d8418600ba5f6ff3a835c68b8a72ba890.tar.bz2
Issue #1050746 by grendzy, xjm, Everett Zufelt: Fixed HTTPS sessions not working in all cases.
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/tests/session.test11
1 files changed, 3 insertions, 8 deletions
diff --git a/modules/simpletest/tests/session.test b/modules/simpletest/tests/session.test
index bc72e5c5e..e5ceb7538 100644
--- a/modules/simpletest/tests/session.test
+++ b/modules/simpletest/tests/session.test
@@ -455,7 +455,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));
@@ -471,15 +471,10 @@ class SessionHttpsTestCase extends DrupalWebTestCase {
$this->drupalGet('user');
$form = $this->xpath('//form[@id="user-login"]');
$form[0]['action'] = $this->httpsUrl('user');
- $this->drupalPost(NULL, $edit, t('Log in'), array(), array('Cookie: ' . $secure_session_name . '=' . $this->cookies[$secure_session_name]['value']));
-
- // Get the insecure session cookie set by the secure login POST request.
- $headers = $this->drupalGetHeaders(TRUE);
- strtok($headers[0]['set-cookie'], ';=');
- $session_id = strtok(';=');
+ $this->drupalPost(NULL, $edit, t('Log in'));
// Test that the user is also authenticated on the insecure site.
- $this->drupalGet("user/{$user->uid}/edit", array(), array('Cookie: ' . $insecure_session_name . '=' . $session_id));
+ $this->drupalGet("user/{$user->uid}/edit");
$this->assertResponse(200);
}