/** * @covers SimplyDO\OAuthResponse::setResponse * @covers SimplyDO\OAuthResponse::getResponse */ public function testShouldSetAndGetArrayResponse() { $this->model->setResponse(json_encode(['key' => 'value'])); $response = $this->model->getResponse(); $this->assertTrue(is_array($response)); $this->assertArrayHasKey('key', $response); }
/** * @param OAuthResponse $response * @return array */ public function handleError(OAuthResponse $response) { return ['error' => $response->getCode(), 'error_message' => $response->getError(), 'raw_response' => $response->getResponse()]; }