function SessionTest::assertSessionCookie

Assert whether the SimpleTest browser sent a session cookie.

1 call to SessionTest::assertSessionCookie()
SessionTest::testEmptyAnonymousSession in drupal/core/modules/system/lib/Drupal/system/Tests/Session/SessionTest.php
Test that empty anonymous sessions are destroyed.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Session/SessionTest.php, line 279
Definition of Drupal\system\Tests\Session\SessionTest.

Class

SessionTest

Namespace

Drupal\system\Tests\Session

Code

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