protected function SessionHttpsTest::assertSessionIds

Test that there exists a session with two specific session IDs.

Parameters

$sid: The insecure session ID to search for.

$ssid: The secure 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 drupal/core/modules/system/lib/Drupal/system/Tests/Session/SessionHttpsTest.php

File

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

Class

SessionHttpsTest
Ensure that when running under HTTPS two session cookies are generated.

Namespace

Drupal\system\Tests\Session

Code

protected function assertSessionIds($sid, $ssid, $assertion_text) {
  $args = array(
    ':sid' => $sid,
    ':ssid' => $ssid,
  );
  return $this
    ->assertTrue(db_query('SELECT timestamp FROM {sessions} WHERE sid = :sid AND ssid = :ssid', $args)
    ->fetchField(), $assertion_text);
}