示例#1
0
 public function testSaveSavesTheMaestranoSessionInHttpSession()
 {
     $oldSubject = new Maestrano_Sso_Session($this->httpSession);
     $oldSubject->setUid($oldSubject->getUid() + "aaa");
     $oldSubject->setGroupUid($oldSubject->getGroupUid() + "aaa");
     $oldSubject->setSessionToken($oldSubject->getSessionToken() + "aaa");
     $date = new DateTime();
     $date->add(new DateInterval('PT100M'));
     $oldSubject->setRecheck($date);
     $oldSubject->save();
     $this->subject = new Maestrano_Sso_Session($this->httpSession);
     $this->assertEquals($oldSubject->getUid(), $this->subject->getUid());
     $this->assertEquals($oldSubject->getGroupUid(), $this->subject->getGroupUid());
     $this->assertEquals($oldSubject->getSessionToken(), $this->subject->getSessionToken());
     $this->assertEquals($oldSubject->getRecheck(), $this->subject->getRecheck());
 }