You are here

public function SessionStateHandlerTest::testStateStoredCorrectly in Auth0 Single Sign On 8.2

Test that state is stored and retrieved properly.

Return value

void

File

vendor/auth0/auth0-php/tests/API/Helpers/State/SessionStateHandlerTest.php, line 47

Class

SessionStateHandlerTest
Class SessionStateHandlerTest

Namespace

Auth0\Tests\Api\Helpers\State

Code

public function testStateStoredCorrectly() {
  $uniqid = uniqid();

  // Suppressing "headers already sent" warning related to cookies.
  // phpcs:ignore
  @$this->stateHandler
    ->store($uniqid);
  $this
    ->assertEquals($uniqid, $this->sessionStore
    ->get(SessionStateHandler::STATE_NAME));
}