コード例 #1
0
 protected function mockResponse($answer, $contentType = 'application/json')
 {
     $response = new Http\Response();
     $response = $response->withHeader('Content-Type', $contentType)->withBody($answer);
     $client = $this->getMock('Everypay\\Http\\Client\\CurlClient', array('send'));
     $client->expects($this->once())->method('send')->will($this->returnValue($response));
     AbstractResource::setClient($client);
 }