diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-07-01 12:47:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-07-01 12:47:30 +0000 |
commit | 5962cc5ab22bc07995b5886305255f93cab2a165 (patch) | |
tree | 5ab79c7b8b62b994c37ab0e82f45653b38eb6628 /modules/simpletest/tests/session.test | |
parent | 907faab2bbf0e4b701c7a2d73f653f513ff911cd (diff) | |
download | brdo-5962cc5ab22bc07995b5886305255f93cab2a165.tar.gz brdo-5962cc5ab22bc07995b5886305255f93cab2a165.tar.bz2 |
- Patch #477944 by DamZ: more streamlining and clean-up of session handling code.
Diffstat (limited to 'modules/simpletest/tests/session.test')
-rw-r--r-- | modules/simpletest/tests/session.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/simpletest/tests/session.test b/modules/simpletest/tests/session.test index d53c14c20..fb82f179d 100644 --- a/modules/simpletest/tests/session.test +++ b/modules/simpletest/tests/session.test @@ -195,6 +195,17 @@ class SessionTestCase extends DrupalWebTestCase { $this->assertNoText(t('This is a dummy message.'), t('Message was not cached.')); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', t('Page was cached.')); $this->assertFalse($this->drupalGetHeader('Set-Cookie'), t('New session was not started.')); + + // Verify that no session is created if drupal_save_session(FALSE) is called. + $this->drupalGet('session-test/set-message-but-dont-save'); + $this->assertSessionCookie(FALSE); + $this->assertSessionEmpty(TRUE); + + // Verify that no message is displayed. + $this->drupalGet(''); + $this->assertSessionCookie(FALSE); + $this->assertSessionEmpty(TRUE); + $this->assertNoText(t('This is a dummy message.'), t('The message was not saved.')); } /** @@ -205,6 +216,7 @@ class SessionTestCase extends DrupalWebTestCase { function sessionReset($uid = 0) { // Close the internal browser. $this->curlClose(); + $this->loggedInUser = FALSE; // Change cookie file for user. $this->cookieFile = file_directory_temp() . '/cookie.' . $uid . '.txt'; |