The MockClientStreamingCall class is used to mock out the \Grpc\ClientStreamingCall class (https://github.com/grpc/grpc/blob/master/src/php/lib/Grpc/ClientStreamingCall.php)
The MockClientStreamingCall 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. It also provides a write() method that accepts request objects, and a getAllRequests() method that returns all request objects passed to write(), and clears them.
- internal
- Extends
Grpc\AbstractCall Grpc\ClientStreamingCall
Methods |
public __construct( $response, $deserialize = NULL, ?stdClass $status = NULL) MockClientStreamingCall constructor.
|
public popReceivedCalls() Return a list of calls made to write(), and clear $receivedFuncCalls.
|
public wait() Immediately return the preset response object and status.
|
public write( $request, array $options = []) Save the request object, to be retrieved via getReceivedCalls()
|
Properties |
Methods |
Properties |
private $mockUnaryCall = NULL |
private $receivedWrites = [] |
private $waitCalled = false |