Method |
Description |
|
__construct ( callable | null $callback, string | null $label, CallFactory $callFactory, Invoker $invoker, GeneratorSpyFactory $generatorSpyFactory, IterableSpyFactory $iterableSpyFactory ) |
Construct a new spy. |
|
addCall ( Eloquent\Phony\Call\Call $call ) |
Add a call. |
|
allCalls ( ) : array |
Get all calls as an array. |
|
allEvents ( ) : array |
Get all events as an array. |
|
callAt ( integer $index ) : Eloquent\Phony\Call\Call |
Get a call by index. |
|
callCount ( ) : integer |
Get the number of calls. |
|
count ( ) : integer |
Get the event count. |
|
eventAt ( integer $index ) : Eloquent\Phony\Event\Event |
Get an event by index. |
|
eventCount ( ) : integer |
Get the number of events. |
|
firstCall ( ) : Eloquent\Phony\Call\Call |
Get the first call. |
|
firstEvent ( ) : Eloquent\Phony\Event\Event |
Get the first event. |
|
getIterator ( ) : Iterator |
Get an iterator for this collection. |
|
hasCalls ( ) : boolean |
Returns true if this collection contains any calls. |
|
hasEvents ( ) : boolean |
Returns true if this collection contains any events. |
|
invokeWith ( Arguments | array $arguments = [] ) : mixed |
Invoke this object. |
|
lastCall ( ) : Eloquent\Phony\Call\Call |
Get the last call. |
|
lastEvent ( ) : Eloquent\Phony\Event\Event |
Get the last event. |
|
nextIndex ( ) : integer |
Get the next call index. |
|
setCalls ( array $calls ) |
Set the calls. |
|
setUseGeneratorSpies ( boolean $useGeneratorSpies ) |
Turn on or off the use of generator spies. |
|
setUseIterableSpies ( boolean $useIterableSpies ) |
Turn on or off the use of iterable spies. |
|
startRecording ( ) |
Start recording calls. |
|
stopRecording ( ) |
Stop recording calls. |
|
useGeneratorSpies ( ) : boolean |
Returns true if this spy uses generator spies. |
|
useIterableSpies ( ) : boolean |
Returns true if this spy uses iterable spies. |
|