public function SessionStoreTest::testInitSession in Auth0 Single Sign On 8.2
Test that SessionStore::initSession ran and cookie params are stored correctly.
Return value
void
File
- vendor/
auth0/ auth0-php/ tests/ Store/ SessionStoreTest.php, line 57
Class
- SessionStoreTest
- Class SessionStoreTest. Tests the SessionStore class.
Code
public function testInitSession() {
// Suppressing "headers already sent" warning related to cookies.
// phpcs:ignore
@self::$sessionStore
->set(self::TEST_KEY, self::TEST_VALUE);
// Make sure we have a session to check.
$this
->assertNotEmpty(session_id());
$cookieParams = session_get_cookie_params();
$this
->assertEquals(self::COOKIE_LIFETIME, $cookieParams['lifetime']);
}