function expireRestTokens(UserManager $user_manager)
 {
     $token_dao = new Rest_TokenDao();
     $token_factory = new Rest_TokenFactory($token_dao);
     $token_manager = new Rest_TokenManager($token_dao, $token_factory, $user_manager);
     $token_manager->expireOldTokens();
 }
示例#2
0
 public function _itGeneratesAProperToken()
 {
     stub($this->token_dao)->addTokenForUserId()->returns(true);
     $result = $this->token_manager->generateTokenForUser($this->user);
     var_dump($result);
 }