Checks if the session is started or not.
public static isSessionStarted ( ) : boolean | ||
return | boolean | true if the sessíon is started |
/** * Tests the isSessionStarted method of the OneLogin_Saml2_Utils * * @covers OneLogin_Saml2_Utils::isSessionStarted */ public function testisSessionStarted() { $this->assertFalse(OneLogin_Saml2_Utils::isSessionStarted()); session_start(); $this->assertTrue(OneLogin_Saml2_Utils::isSessionStarted()); }
/** * Deletes the local session. */ public static function deleteLocalSession() { if (OneLogin_Saml2_Utils::isSessionStarted()) { session_destroy(); } unset($_SESSION); }
/** * Tests the isSessionStarted method of the OneLogin_Saml2_Utils * * @covers OneLogin_Saml2_Utils::isSessionStarted */ public function testisSessionStarted() { if (getenv("TRAVIS")) { // Can't test that on TRAVIS $this->markTestSkipped("Can't test that on TRAVIS"); } else { $this->assertFalse(OneLogin_Saml2_Utils::isSessionStarted()); session_start(); $this->assertTrue(OneLogin_Saml2_Utils::isSessionStarted()); } }