Метод | Описание | |
---|---|---|
__construct ( callable | null $callback, string | null $label, |
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 ( |
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. |
Метод | Описание | |
---|---|---|
normalizeIndex ( $size, $index, &$normalized = null ) |
public __construct ( callable | null $callback, string | null $label, |
||
$callback | callable | null | The callback, or null to create an anonymous spy. |
$label | string | null | The label. |
$callFactory | The call factory to use. | |
$invoker | The invoker to use. | |
$generatorSpyFactory | The generator spy factory to use. | |
$iterableSpyFactory | The iterable spy factory to use. |
public addCall ( Eloquent\Phony\Call\Call $call ) | ||
$call | Eloquent\Phony\Call\Call | The call. |
public allEvents ( ) : array |
||
Результат | array |
public eventCount ( ) : integer | ||
Результат | integer | The event count. |
public firstCall ( ) : Eloquent\Phony\Call\Call | ||
Результат | Eloquent\Phony\Call\Call | The call. |
public firstEvent ( ) : Eloquent\Phony\Event\Event | ||
Результат | Eloquent\Phony\Event\Event | The event. |
public getIterator ( ) : Iterator | ||
Результат | Iterator | The iterator. |
public invokeWith ( |
||
$arguments | The arguments. | |
Результат | mixed | The result of invocation. |
public lastCall ( ) : Eloquent\Phony\Call\Call | ||
Результат | Eloquent\Phony\Call\Call | The call. |
public lastEvent ( ) : Eloquent\Phony\Event\Event | ||
Результат | Eloquent\Phony\Event\Event | The event. |
public setUseGeneratorSpies ( boolean $useGeneratorSpies ) | ||
$useGeneratorSpies | boolean | True to use generator spies. |
public setUseIterableSpies ( boolean $useIterableSpies ) | ||
$useIterableSpies | boolean | True to use iterable spies. |
public useGeneratorSpies ( ) : boolean | ||
Результат | boolean | True if this spy uses generator spies. |
public useIterableSpies ( ) : boolean | ||
Результат | boolean | True if this spy uses iterable spies. |