Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MockHandler.php

function MockHandler::createWithMiddleware

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

Parameters

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

File

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

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) : HandlerStack {
    return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal