function MemcacheSessionTestCase::sessionReset in Zircon Profile 8.0
Same name and namespace in other branches
- 8 modules/memcache/tests/memcache-session.test \MemcacheSessionTestCase::sessionReset()
Reset the cookie file so that it refers to the specified user.
Parameters
$uid User id to set as the active session.:
2 calls to MemcacheSessionTestCase::sessionReset()
- MemcacheSessionTestCase::testDataPersistence in modules/
memcache/ tests/ memcache-session.test - Test data persistence via the session_test module callbacks. Also tests drupal_session_count() since session data is already generated here.
- MemcacheSessionTestCase::testSessionSaveRegenerate in modules/
memcache/ tests/ memcache-session.test - Tests for drupal_save_session() and drupal_session_regenerate().
File
- modules/
memcache/ tests/ memcache-session.test, line 190 - Provides SimpleTests for core session handling functionality.
Class
- MemcacheSessionTestCase
- @file Provides SimpleTests for core session handling functionality.
Code
function sessionReset($uid = 0) {
// Close the internal browser.
$this
->curlClose();
$this->loggedInUser = FALSE;
// Change cookie file for user.
$this->cookieFile = variable_get('file_public_path', conf_path() . '/files') . '/cookie.' . $uid . '.txt';
$this->additionalCurlOptions[CURLOPT_COOKIEFILE] = $this->cookieFile;
$this->additionalCurlOptions[CURLOPT_COOKIESESSION] = TRUE;
$this
->drupalGet('session-test/get');
$this
->assertResponse(200, t('Session test module is correctly enabled.'), t('Session'));
}