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")); }
/** * 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; }