protected function SessionHttpsTest::assertSessionIds in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Session/SessionHttpsTest.php \Drupal\system\Tests\Session\SessionHttpsTest::assertSessionIds()
 
Test that there exists a session with two specific session IDs.
Parameters
$sid: The insecure session ID to search for.
$assertion_text: The text to display when we perform the assertion.
Return value
The result of assertTrue() that there's a session in the system that has the given insecure and secure session IDs.
1 call to SessionHttpsTest::assertSessionIds()
- SessionHttpsTest::testHttpsSession in core/
modules/ system/ src/ Tests/ Session/ SessionHttpsTest.php  
File
- core/
modules/ system/ src/ Tests/ Session/ SessionHttpsTest.php, line 222  - Contains \Drupal\system\Tests\Session\SessionHttpsTest.
 
Class
- SessionHttpsTest
 - Ensure that when running under HTTPS two session cookies are generated.
 
Namespace
Drupal\system\Tests\SessionCode
protected function assertSessionIds($sid, $assertion_text) {
  $args = array(
    ':sid' => Crypt::hashBase64($sid),
  );
  return $this
    ->assertTrue(db_query('SELECT timestamp FROM {sessions} WHERE sid = :sid', $args)
    ->fetchField(), $assertion_text);
}