public function testCreateResponse()
 {
     $data = ['some' => 'data'];
     $factory = new ResponseFactory();
     $response = $factory->generateResponse('200', json_encode($data));
     $this->assertInstanceOf('Silktide\\FreshdeskApi\\Response', $response, 'Object of type Response was not returned from ResponseFactory');
 }
Пример #2
0
 /**
  * Create our response object from the Guzzle response
  *
  * @param GuzzleResponse $response
  * @return Response
  */
 protected function createResponse(GuzzleResponse $response)
 {
     return $this->responseFactory->generateResponse($response->getStatusCode(), $response->getBody()->__toString());
 }