Method | Description | |
---|---|---|
__construct ( Eloquent\Phony\Spy\Spy $spy, |
Construct a new spy verifier. | |
__invoke ( ) : mixed | Invoke this object. | |
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 ) : |
Get a call by index. | |
callCount ( ) : integer | Get the number of calls. | |
callback ( ) : callable | Get the callback. | |
called ( ) : Eloquent\Phony\Event\EventCollection | Throws an exception unless called. | |
calledWith ( ) : Eloquent\Phony\Event\EventCollection | Throws an exception unless called with the supplied arguments. | |
checkCalled ( ) : Eloquent\Phony\Event\EventCollection | null | Checks if called. | |
checkCalledWith ( ) : Eloquent\Phony\Event\EventCollection | null | Checks if called with the supplied arguments. | |
checkCompleted ( ) : Eloquent\Phony\Event\EventCollection | null | Checks if this spy completed. | |
checkGenerated ( ) : |
Checks if this spy returned a generator. | |
checkIterated ( ) : |
Checks if this spy returned an iterable. | |
checkResponded ( ) : Eloquent\Phony\Event\EventCollection | null | Checks if this spy responded. | |
checkReturned ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection | null | Checks if this spy returned the supplied value. | |
checkThrew ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection | null | Checks if an exception of the supplied type was thrown. | |
completed ( ) : Eloquent\Phony\Event\EventCollection | Throws an exception unless this spy completed. | |
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. | |
generated ( ) : |
Throws an exception unless this spy returned a generator. | |
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. | |
invoke ( ) : mixed | Invoke this object. | |
invokeWith ( |
Invoke this object. | |
isAnonymous ( ) : boolean | Returns true if anonymous. | |
iterated ( ) : |
Throws an exception unless this spy returned an iterable. | |
label ( ) : string | null | Get the label. | |
lastCall ( ) : Eloquent\Phony\Call\Call | Get the last call. | |
lastEvent ( ) : Eloquent\Phony\Event\Event | Get the last event. | |
responded ( ) : Eloquent\Phony\Event\EventCollection | Throws an exception unless this spy responded. | |
returned ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection | Throws an exception unless this spy returned the supplied value. | |
setCalls ( array $calls ) | Set the calls. | |
setLabel ( string | null $label ) | Set the label. | |
setUseGeneratorSpies ( boolean $useGeneratorSpies ) | Turn on or off the use of generator spies. | |
setUseIterableSpies ( boolean $useIterableSpies ) | Turn on or off the use of iterable spies. | |
spy ( ) : Eloquent\Phony\Spy\Spy | Get the spy. | |
startRecording ( ) | Start recording calls. | |
stopRecording ( ) | Stop recording calls. | |
threw ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection | Throws an exception unless an exception of the supplied type was thrown. | |
useGeneratorSpies ( ) : boolean | Returns true if this spy uses generator spies. | |
useIterableSpies ( ) : boolean | Returns true if this spy uses iterable spies. |
public __construct ( Eloquent\Phony\Spy\Spy $spy, |
||
$spy | Eloquent\Phony\Spy\Spy | The spy. |
$matcherFactory | The matcher factory to use. | |
$matcherVerifier | The macther verifier to use. | |
$generatorVerifierFactory | The generator verifier factory to use. | |
$iterableVerifierFactory | The iterable verifier factory to use. | |
$callVerifierFactory | The call verifier factory to use. | |
$assertionRecorder | Eloquent\Phony\Assertion\AssertionRecorder | The assertion recorder to use. |
$assertionRenderer | The assertion renderer to use. |
public addCall ( Eloquent\Phony\Call\Call $call ) | ||
$call | Eloquent\Phony\Call\Call | The call. |
public called ( ) : Eloquent\Phony\Event\EventCollection | ||
return | Eloquent\Phony\Event\EventCollection | The result. |
public calledWith ( ) : Eloquent\Phony\Event\EventCollection | ||
return | Eloquent\Phony\Event\EventCollection | The result. |
public checkCalled ( ) : Eloquent\Phony\Event\EventCollection | null | ||
return | Eloquent\Phony\Event\EventCollection | null | The result. |
public checkCalledWith ( ) : Eloquent\Phony\Event\EventCollection | null | ||
return | Eloquent\Phony\Event\EventCollection | null | The result. |
public checkCompleted ( ) : Eloquent\Phony\Event\EventCollection | null | ||
return | Eloquent\Phony\Event\EventCollection | null | The result. |
public checkGenerated ( ) : |
||
return | The result. |
public checkIterated ( ) : |
||
return | The result. |
public checkResponded ( ) : Eloquent\Phony\Event\EventCollection | null | ||
return | Eloquent\Phony\Event\EventCollection | null | The result. |
public checkReturned ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection | null | ||
$value | mixed | The value. |
return | Eloquent\Phony\Event\EventCollection | null | The result. |
public checkThrew ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection | null | ||
$type | Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null | An exception to match, the type of exception, or null for any exception. |
return | Eloquent\Phony\Event\EventCollection | null | The result. |
public completed ( ) : Eloquent\Phony\Event\EventCollection | ||
return | Eloquent\Phony\Event\EventCollection | The result. |
public eventCount ( ) : integer | ||
return | integer | The event count. |
public firstCall ( ) : Eloquent\Phony\Call\Call | ||
return | Eloquent\Phony\Call\Call | The call. |
public firstEvent ( ) : Eloquent\Phony\Event\Event | ||
return | Eloquent\Phony\Event\Event | The event. |
public generated ( ) : |
||
return | The result. |
public getIterator ( ) : Iterator | ||
return | Iterator | The iterator. |
public invokeWith ( |
||
$arguments | The arguments. | |
return | mixed | The result of invocation. |
public isAnonymous ( ) : boolean | ||
return | boolean | True if anonymous. |
public iterated ( ) : |
||
return | The result. |
public lastCall ( ) : Eloquent\Phony\Call\Call | ||
return | Eloquent\Phony\Call\Call | The call. |
public lastEvent ( ) : Eloquent\Phony\Event\Event | ||
return | Eloquent\Phony\Event\Event | The event. |
public responded ( ) : Eloquent\Phony\Event\EventCollection | ||
return | Eloquent\Phony\Event\EventCollection | The result. |
public setUseGeneratorSpies ( boolean $useGeneratorSpies ) | ||
$useGeneratorSpies | boolean | True to use generator spies. |
public setUseIterableSpies ( boolean $useIterableSpies ) | ||
$useIterableSpies | boolean | True to use iterable spies. |
public spy ( ) : Eloquent\Phony\Spy\Spy | ||
return | Eloquent\Phony\Spy\Spy | The spy. |
public threw ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection | ||
$type | Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null | An exception to match, the type of exception, or null for any exception. |
return | Eloquent\Phony\Event\EventCollection | The result. |
public useGeneratorSpies ( ) : boolean | ||
return | boolean | True if this spy uses generator spies. |
public useIterableSpies ( ) : boolean | ||
return | boolean | True if this spy uses iterable spies. |