class MockServerStreamingCall extends ServerStreamingCall implements ServerStreamingCallInterface (View source)

internal  
 

The MockServerStreamingCall class is used to mock out the \Grpc\ServerStreamingCall class (https://github.com/grpc/grpc/blob/master/src/php/lib/Grpc/ServerStreamingCall.php)

Traits

Methods

deserializeMessage(mixed $message, mixed $deserialize)

No description

__construct(array $responses, callable|array|null $deserialize = null, stdClass $status = null)

MockServerStreamingCall constructor.

mixed
responses()

No description

getStatus()

No description

Details

protected deserializeMessage(mixed $message, mixed $deserialize)

No description

Parameters

mixed $message
mixed $deserialize

__construct(array $responses, callable|array|null $deserialize = null, stdClass $status = null)

MockServerStreamingCall constructor.

Parameters

array $responses

A list of response objects.

callable|array|null $deserialize

An optional deserialize method for the response object.

stdClass $status

An optional status object. If set to null, a status of OK is used.

mixed responses()

No description

Return Value

mixed

An iterator of response values.

stdClass getStatus()

No description

Return Value

stdClass

The API status.

Exceptions

ApiException