You are here

public static function MockHandler::createWithMiddleware in Auth0 Single Sign On 8.2

Creates a new MockHandler that uses the default handler stack list of middlewares.

Parameters

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.:

Return value

HandlerStack

File

vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php, line 33

Class

MockHandler
Handler that returns responses or throw exceptions from a queue.

Namespace

GuzzleHttp\Handler

Code

public static function createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null) {
  return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
}