public function itThrowsAnExceptionIfTokenIsInvalid() { stub($this->token_dao)->checkTokenExistenceForUserId($this->user_id, $this->token_value)->returnsEmptyDar(); $this->expectException("Rest_Exception_InvalidTokenException"); $this->token_manager->checkToken($this->token); }