示例#1
0
 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
 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);
 }