You are here

function SessionTestCase::assertSessionCookie in SimpleTest 7

Assert whether the SimpleTest browser sent a session cookie.

1 call to SessionTestCase::assertSessionCookie()
SessionTestCase::testEmptyAnonymousSession in tests/session.test
Test that empty anonymous sessions are destroyed.

File

tests/session.test, line 231
Provides SimpleTests for core session handling functionality.

Class

SessionTestCase
@file Provides SimpleTests for core session handling functionality.

Code

function assertSessionCookie($sent) {
  if ($sent) {
    $this
      ->assertNotNull($this->session_id, t('Session cookie was sent.'));
  }
  else {
    $this
      ->assertNull($this->session_id, t('Session cookie was not sent.'));
  }
}