예제 #1
0
 public function testCanGetSession()
 {
     $session = new Model\Session();
     $expectedArray = array("session_value" => "some_value");
     $session->set("some_session", "some_value");
     $this->assertEquals($expectedArray["session_value"], $session->get("some_session"));
 }
예제 #2
0
파일: Auth.php 프로젝트: jh222xk/pophub
 /**
  * Get's a token via the given $code and sets a session
  * if the $code is valid.
  * @param String $code
  * @return String
  */
 public function getToken($code)
 {
     try {
         $token = $this->model->postAccessToken($code);
     } catch (\Exception $e) {
         return;
     }
     $session = new Session();
     $session->set($this->token, $token);
     return $token;
 }