You are here

public function SessionStoreTest::testSet in Auth0 Single Sign On 8.2

Test that SessionStore::set stores the correct value.

@runInSeparateProcess

Return value

void

File

vendor/auth0/auth0-php/tests/Store/SessionStoreTest.php, line 88

Class

SessionStoreTest
Class SessionStoreTest. Tests the SessionStore class.

Code

public function testSet() {

  // Make sure this key does not exist yet so we can test that it was set.
  $this
    ->assertFalse(isset($_SESSION[self::$sessionKey]));

  // Suppressing "headers already sent" warning related to cookies.
  // phpcs:ignore
  @self::$sessionStore
    ->set(self::TEST_KEY, self::TEST_VALUE);
  $this
    ->assertEquals(self::TEST_VALUE, $_SESSION[self::$sessionKey]);
}