$queue
$queue :
Handler that returns responses or throw exceptions from a queue.
createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null) : \GuzzleHttp\HandlerStack
Creates a new MockHandler that uses the default handler stack list of middlewares.
array | $queue | Array of responses, callables, or exceptions. |
callable | $onFulfilled | Callback to invoke when the return value is fulfilled. |
callable | $onRejected | Callback to invoke when the return value is rejected. |
__construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null)
The passed in value must be an array of {@see Psr7\Http\Message\ResponseInterface} objects, Exceptions, callables, or Promises.
array | $queue | |
callable | $onFulfilled | Callback to invoke when the return value is fulfilled. |
callable | $onRejected | Callback to invoke when the return value is rejected. |
__invoke(\Psr\Http\Message\RequestInterface $request, array $options)
\Psr\Http\Message\RequestInterface | $request | |
array | $options |
getLastRequest() : \Psr\Http\Message\RequestInterface
Get the last received request.
invokeStats(\Psr\Http\Message\RequestInterface $request, array $options, \Psr\Http\Message\ResponseInterface $response = null, $reason = null)
\Psr\Http\Message\RequestInterface | $request | |
array | $options | |
\Psr\Http\Message\ResponseInterface | $response | |
$reason |