MockClientStreamingCall
class MockClientStreamingCall
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.
Methods
MockClientStreamingCall constructor.
Immediately return the preset response object and status.
Save the request object, to be retrieved via getReceivedCalls()
Return a list of calls made to write(), and clear $receivedFuncCalls.
Details
at line 59
__construct($response, callable|null $deserialize = null, MockStatus|null $status = null)
MockClientStreamingCall constructor.
at line 68
array
wait()
Immediately return the preset response object and status.
at line 79
write(Message|mixed $request)
Save the request object, to be retrieved via getReceivedCalls()
at line 97
mixed[]
popReceivedCalls()
Return a list of calls made to write(), and clear $receivedFuncCalls.