public function testExtendsSession()
 {
     $session = new WebServiceUserSession(123);
     $session->SessionExpiration = '2012-05-01';
     $session->ExtendSession();
     $this->assertEquals(WebServiceExpiration::Create(), $session->SessionExpiration);
 }
 public function setup()
 {
     parent::setup();
     $this->userSessionRepository = $this->getMock('IUserSessionRepository');
     $this->server = $this->getMock('IRestServer');
     $this->security = new WebServiceSecurity($this->userSessionRepository);
     $this->session = new FakeWebServiceUserSession($this->userId);
     $this->session->SessionToken = $this->sessionToken;
     $this->session->SessionExpiration = WebServiceExpiration::Create();
 }
 /**
  * @return bool
  */
 public function IsExpired()
 {
     return WebServiceExpiration::IsExpired($this->SessionExpiration);
 }