(no description)
File Size: | 211 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
MockHandler:: (9 methods):
createWithMiddleware()
__construct()
__invoke()
append()
getLastRequest()
getLastOptions()
count()
reset()
invokeStats()
Class: MockHandler - X-Ref
Handler that returns responses or throw exceptions from a queue.createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null) X-Ref |
Creates a new MockHandler that uses the default handler stack list of middlewares. param: array|null $queue Array of responses, callables, or exceptions. param: callable|null $onFulfilled Callback to invoke when the return value is fulfilled. param: callable|null $onRejected Callback to invoke when the return value is rejected. |
__construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null) X-Ref |
The passed in value must be an array of {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions, callables, or Promises. param: array<int, mixed>|null $queue The parameters to be passed to the append function, as an indexed array. param: callable|null $onFulfilled Callback to invoke when the return value is fulfilled. param: callable|null $onRejected Callback to invoke when the return value is rejected. |
__invoke(RequestInterface $request, array $options) X-Ref |
No description |
append(...$values) X-Ref |
No description |
getLastRequest() X-Ref |
Get the last received request. |
getLastOptions() X-Ref |
Get the last received request options. |
count() X-Ref |
Returns the number of remaining items in the queue. |
reset() X-Ref |
No description |
invokeStats(RequestInterface $request,array $options,ResponseInterface $response = null,$reason = null) X-Ref |
param: mixed $reason Promise or reason. |