메소드 |
설명 |
|
__construct ( Eloquent\Phony\Spy\Spy $spy, MatcherFactory $matcherFactory, MatcherVerifier $matcherVerifier, GeneratorVerifierFactory $generatorVerifierFactory, IterableVerifierFactory $iterableVerifierFactory, CallVerifierFactory $callVerifierFactory, Eloquent\Phony\Assertion\AssertionRecorder $assertionRecorder, AssertionRenderer $assertionRenderer ) |
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 ) : CallVerifier |
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 ( ) : GeneratorVerifier | null |
Checks if this spy returned a generator. |
|
checkIterated ( ) : IterableVerifier | null |
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 ( ) : GeneratorVerifier |
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 ( Arguments | array $arguments = [] ) : mixed |
Invoke this object. |
|
isAnonymous ( ) : boolean |
Returns true if anonymous. |
|
iterated ( ) : IterableVerifier |
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. |
|