Exemple #1
0
 /**
  * @param $key
  * @param $sessionParameter
  * @return $this
  */
 public function updateAuthSession($key, $sessionParameter)
 {
     $notExists = true;
     foreach ($this->authSessions as $authSession) {
         /* @var $authSession AuthSession */
         if ($key == $authSession->getName()) {
             $authSession->setSession($sessionParameter);
             $notExists = false;
         }
     }
     if ($notExists) {
         $authSession = new AuthSession();
         $authSession->setName($key);
         $authSession->setSession($sessionParameter);
         $this->authSessions[] = $authSession;
     }
     return $this;
 }
Exemple #2
0
 /**
  * @testdox Allows to set the values of the session
  * @covers Auth\Entity\AuthSession::getSession
  * @covers Auth\Entity\AuthSession::setSession
  * @dataProvider provideSessionTestData
  */
 public function testSetGetSession($session, $expectedSession)
 {
     $input = $session;
     $this->target->setSession($input);
     $this->assertEquals($input, $this->target->getSession());
 }