class MockBidiStreamingCall extends BidiStreamingCall (View source)

internal  
 

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

Traits

Methods

deserializeMessage(mixed $message, mixed $deserialize)

No description

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

MockBidiStreamingCall constructor.

mixed|null
read()

No description

stdClass|null
getStatus()

No description

write(Message|mixed $request, array $options = [])

Save the request object, to be retrieved via getReceivedCalls()

writesDone()

Set writesDone to true

array
popReceivedCalls()

Return a list of calls made to write(), and clear $receivedFuncCalls.

Details

protected deserializeMessage(mixed $message, mixed $deserialize)

No description

Parameters

mixed $message
mixed $deserialize

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

MockBidiStreamingCall constructor.

Parameters

array $responses

A list of response objects.

mixed|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|null read()

No description

Return Value

mixed|null

Exceptions

ApiException

stdClass|null getStatus()

No description

Return Value

stdClass|null

Exceptions

ApiException

write(Message|mixed $request, array $options = [])

Save the request object, to be retrieved via getReceivedCalls()

Parameters

Message|mixed $request

The request object

array $options

An array of options.

Exceptions

ApiException

writesDone()

Set writesDone to true

array popReceivedCalls()

Return a list of calls made to write(), and clear $receivedFuncCalls.

Return Value

array

An array of received requests