You are here

function MemcacheSessionTestCase::assertSessionEmpty in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 modules/memcache/tests/memcache-session.test \MemcacheSessionTestCase::assertSessionEmpty()

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

1 call to MemcacheSessionTestCase::assertSessionEmpty()
MemcacheSessionTestCase::testEmptyAnonymousSession in modules/memcache/tests/memcache-session.test
Test that empty anonymous sessions are destroyed.

File

modules/memcache/tests/memcache-session.test, line 218
Provides SimpleTests for core session handling functionality.

Class

MemcacheSessionTestCase
@file Provides SimpleTests for core session handling functionality.

Code

function assertSessionEmpty($empty) {
  if ($empty) {
    $this
      ->assertIdentical($this
      ->drupalGetHeader('X-Session-Empty'), '1', t('Session was empty.'));
  }
  else {
    $this
      ->assertIdentical($this
      ->drupalGetHeader('X-Session-Empty'), '0', t('Session was not empty.'));
  }
}