コード例 #1
0
ファイル: ApiClientTest.php プロジェクト: xabbuh/xapi-client
 protected function validateStoreApiCall($method, $uri, array $urlParameters, $statusCode, $rawResponse, $object, array $serializerMap = array())
 {
     $rawRequest = 'the-request-body';
     $response = $this->createResponseMock($statusCode, $rawResponse);
     $request = $this->validateRequest($method, $uri, $urlParameters, $rawRequest, $response);
     $this->requestHandler->expects($this->once())->method('executeRequest')->with($request, array($statusCode))->will($this->returnValue($response));
     $serializerMap[] = array('data' => $object, 'result' => $rawRequest);
     $this->validateSerializer($serializerMap);
 }
コード例 #2
0
ファイル: ApiClientTest.php プロジェクト: php-xapi/client
 protected function validateStoreApiCall($method, $uri, array $urlParameters, $statusCode, $rawResponse, $object, array $serializerMap = array())
 {
     $rawRequest = 'the-request-body';
     $response = $this->getMockBuilder('\\Psr\\Http\\Message\\ResponseInterface')->getMock();
     $response->expects($this->any())->method('getStatusCode')->willReturn($statusCode);
     $response->expects($this->any())->method('getBody')->willReturn($rawResponse);
     $request = $this->validateRequest($method, $uri, $urlParameters, $rawRequest);
     $this->requestHandler->expects($this->once())->method('executeRequest')->with($request, array($statusCode))->willReturn($response);
     $serializerMap[] = array('data' => $object, 'result' => $rawRequest);
     $this->validateSerializer($serializerMap);
 }