Assert whether $_SESSION is empty at the beginning of the request.
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.');
}
}