MockUnaryCall
class MockUnaryCall extends UnaryCall
The MockUnaryCall class is used to mock out the \Grpc\UnaryCall class (https://github.com/grpc/grpc/blob/master/src/php/lib/Grpc/UnaryCall.php)
The MockUnaryCall object is constructed with a response object, an optional deserialize method, and an optional status. The response object and status are returned immediately from the wait() method.
Traits
Methods
__construct(Message $response, callable|null $deserialize = null, MockStatus|null $status = null)
MockUnaryCall constructor.
array
wait()
Immediately return the preset response object and status.
Details
in SerializationTrait at line 36
protected
deserializeMessage($message, $deserialize)
at line 58
__construct(Message $response, callable|null $deserialize = null, MockStatus|null $status = null)
MockUnaryCall constructor.
at line 72
array
wait()
Immediately return the preset response object and status.