isSessionStarted() public static method

Checks if the session is started or not.
public static isSessionStarted ( ) : boolean
return boolean true if the sessíon is started
Example #1
0
 /**
  * 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());
 }
Example #2
0
 /**
  * Deletes the local session.
  */
 public static function deleteLocalSession()
 {
     if (OneLogin_Saml2_Utils::isSessionStarted()) {
         session_destroy();
     }
     unset($_SESSION);
 }
Example #3
0
 /**
  * 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());
     }
 }