send() public method

Deliver the request.
public send ( callable $request, array $args, array $options = [] ) : array
$request callable The request to execute.
$args array The arguments for the request.
$options array [optional] { Request options. @type int $retries Number of retries for a failed request. **Defaults to** `3`. @type array $grpcOptions gRPC specific configuration options. }
return array
 /**
  * @dataProvider exceptionProvider
  */
 public function testCastsToProperException($code, $expectedException)
 {
     $requestWrapper = new GrpcRequestWrapper();
     try {
         $requestWrapper->send(function () use($code) {
             throw new ApiException('message', $code);
         }, [[]], ['retries' => 0]);
     } catch (\Exception $ex) {
         $this->assertInstanceOf($expectedException, $ex);
     }
 }