The MockClientStreamingCall class is used to mock out the \Grpc\ClientStreamingCall class (

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.

public __construct( $response, $deserialize = NULL, $status = NULL)
MockClientStreamingCall constructor.

    public Grpc\AbstractCall::cancel()
    Cancels the call.

    public Grpc\AbstractCall::getMetadata()

    • return mixed The metadata sent by the server
    public Grpc\AbstractCall::getPeer()

    • return string The URI of the endpoint
    public Grpc\AbstractCall::getTrailingMetadata()

    • return mixed The trailing metadata sent by the server
    public popReceivedCalls()
    Return a list of calls made to write(), and clear $receivedFuncCalls.

    • return array An array of received requests
    public Grpc\AbstractCall::setCallCredentials( $call_credentials)
    Set the CallCredentials for the underlying Call.

      public Grpc\ClientStreamingCall::start(array $metadata = [])
      Start the call.

        public wait()
        Immediately return the preset response object and status.

        • return array The response object and status.
        public write( $request, array $options = [])
        Save the request object, to be retrieved via getReceivedCalls()

        • throws ApiException
        protected Grpc\AbstractCall::$call

        • var Call
        protected Grpc\AbstractCall::$deserialize
        protected Grpc\AbstractCall::$metadata
        protected Grpc\AbstractCall::$trailing_metadata
        protected Grpc\AbstractCall::_deserializeResponse( $value)
        Deserialize a response value to an object.

        • return mixed The deserialized value
        protected Grpc\AbstractCall::_serializeMessage( $data)
        Serialize a message to the protobuf binary format.

        • return string The protobuf binary format
        private $mockUnaryCall
        private $receivedWrites
        private $waitCalled
        © 2020 Bruce Wells
        Search Namespaces \ Classes
        ConfigurationNumbers (0-9.) only