Ejemplo n.º 1
0
 /**
  * Performs a call on the service, returning an interpreted response
  *
  * @param string $method        name of the method to call through the service
  * @param mixed  $request       either: request object, or the request body
  * @param mixed  $parameters    extra parameters to send along (optional)
  * @param mixed  $headers       extra headers to send along (optional)
  * @param string $functionName  name of the function called on the ApiClient to start the service
  * @return ServiceResponse fallback to mixed if no interpreter available; make sure there is one
  */
 public function call($method, $request = null, $parameters = null, $headers = null, $functionName = null)
 {
     $this->function = $functionName;
     return parent::call($method, $request, $parameters, $headers);
 }
Ejemplo n.º 2
0
 /**
  * @test
  * @expectedException \InvalidArgumentException
  */
 function it_throws_an_exception_if_an_incorrect_service_request_is_used()
 {
     $service = new RestService();
     $request = new ServiceRequest();
     $service->call(null, $request);
 }