function SessionTestCase::assertSessionEmpty
Assert whether $_SESSION is empty at the beginning of the request.
1 call to SessionTestCase::assertSessionEmpty()
- SessionTestCase::testEmptyAnonymousSession in modules/
simpletest/ tests/ session.test - Test that empty anonymous sessions are destroyed.
File
-
modules/
simpletest/ tests/ session.test, line 525
Class
- SessionTestCase
- @file Provides SimpleTests for core session handling functionality.
Code
function assertSessionEmpty($empty) {
if ($empty) {
$this->assertIdentical($this->drupalGetHeader('X-Session-Empty'), '1', 'Session was empty.');
}
else {
$this->assertIdentical($this->drupalGetHeader('X-Session-Empty'), '0', 'Session was not empty.');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.