1 session.test SessionTestCase::assertSessionEmpty($empty)

Assert whether $_SESSION is empty at the beginning of the request.

File

core/modules/simpletest/tests/session.test, line 275
Provides SimpleTests for core session handling functionality.

Class

SessionTestCase

Code

function assertSessionEmpty($empty) {
  if ($empty) {
    $empty = $this->backdropGetHeader('X-Session-Empty');
    $this->assertTrue($empty === FALSE || $empty === '1', 'Session was empty.');
  }
  else {
    $this->assertIdentical($this->backdropGetHeader('X-Session-Empty'), '0', 'Session was not empty.');
  }
}