public static function MockHandler::createWithMiddleware in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php \GuzzleHttp\Handler\MockHandler::createWithMiddleware()
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
File
- vendor/
guzzlehttp/ guzzle/ src/ Handler/ MockHandler.php, line 32
Class
- MockHandler
- Handler that returns responses or throw exceptions from a queue.
Namespace
GuzzleHttp\HandlerCode
public static function createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null) {
return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
}