Class MockPlugin
Queues mock responses or exceptions and delivers mock responses or exceptions in a fifo order.
- Guzzle\Common\AbstractHasDispatcher implements Guzzle\Common\HasDispatcherInterface
- Guzzle\Plugin\Mock\MockPlugin implements Symfony\Component\EventDispatcher\EventSubscriberInterface, Countable
public
|
|
public static
|
|
public static
array
|
|
public static
|
|
public
|
#
readBodies( boolean $readBodies )
Set whether or not to consume the entity body of a request when a mock response is used |
public
integer
|
|
public
|
#
addResponse( string|
Add a response to the end of the queue |
public
|
|
public
|
|
public
array
|
|
public
boolean
|
|
public
|
#
dequeue(
Get a response from the front of the list and add it to a request |
public
|
|
public
array
|
|
public
|
addSubscriber(),
dispatch(),
getEventDispatcher(),
setEventDispatcher()
|
protected
array
|
$queue
Array of mock responses / exceptions |
#
array()
|
protected
boolean
|
$temporary
Whether or not to remove the plugin when the queue is empty |
#
false
|
protected
array
|
$received
Array of requests that were mocked |
#
array()
|
protected
boolean
|
$readBodies
Whether or not to consume an entity body when a mock response is served |
$eventDispatcher
|