$queue
$queue : array
Handler that returns responses or throw exceptions from a queue.
$queue : array
$lastRequest : \Psr\Http\Message\RequestInterface|null
$lastOptions : array
$onFulfilled : callable|null
$onRejected : callable|null
createWithMiddleware(array|null $queue = null, callable|null $onFulfilled = null, callable|null $onRejected = null) : \GuzzleHttp\HandlerStack
Creates a new MockHandler that uses the default handler stack list of middlewares.
array|null | $queue | Array of responses, callables, or exceptions. |
callable|null | $onFulfilled | Callback to invoke when the return value is fulfilled. |
callable|null | $onRejected | Callback to invoke when the return value is rejected. |
__construct(array<int,mixed>|null $queue = null, callable|null $onFulfilled = null, callable|null $onRejected = null) : mixed
The passed in value must be an array of {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions, callables, or Promises.
array |
$queue | The parameters to be passed to the append function, as an indexed array. |
callable|null | $onFulfilled | Callback to invoke when the return value is fulfilled. |
callable|null | $onRejected | Callback to invoke when the return value is rejected. |
invokeStats(\Psr\Http\Message\RequestInterface $request, array $options, \Psr\Http\Message\ResponseInterface $response = null, mixed $reason = null) : void
\Psr\Http\Message\RequestInterface | $request | |
array | $options | |
\Psr\Http\Message\ResponseInterface | $response | |
mixed | $reason | Promise or reason. |