function SessionTest::assertSessionCookie in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Session/SessionTest.php \Drupal\system\Tests\Session\SessionTest::assertSessionCookie()
 
Assert whether the SimpleTest browser sent a session cookie.
1 call to SessionTest::assertSessionCookie()
- SessionTest::testEmptyAnonymousSession in core/
modules/ system/ src/ Tests/ Session/ SessionTest.php  - Test that empty anonymous sessions are destroyed.
 
File
- core/
modules/ system/ src/ Tests/ Session/ SessionTest.php, line 308  - Contains \Drupal\system\Tests\Session\SessionTest.
 
Class
- SessionTest
 - Drupal session handling tests.
 
Namespace
Drupal\system\Tests\SessionCode
function assertSessionCookie($sent) {
  if ($sent) {
    $this
      ->assertNotNull($this->sessionId, 'Session cookie was sent.');
  }
  else {
    $this
      ->assertNull($this->sessionId, 'Session cookie was not sent.');
  }
}