PHP 인터페이스 Eloquent\Phony\Call\Call

상속: extends Eloquent\Phony\Event\Event, extends Eloquent\Phony\Event\EventCollection
파일 보기 프로젝트 열기: eloquent/phony 0 사용 예제들

공개 메소드들

메소드 설명
addIterableEvent ( Eloquent\Phony\Call\Event\IterableEvent $iterableEvent ) Add an iterable event.
argument ( integer $index ) : mixed Get an argument by index.
arguments ( ) : Arguments | null Get the arguments.
callback ( ) : callable Get the callback.
calledEvent ( ) : CalledEvent Get the 'called' event.
endEvent ( ) : Eloquent\Phony\Call\Event\EndEvent | null Get the end event.
endTime ( ) : float | null Get the time at which the call completed.
exception ( ) : Exceptio\Exception | Erro\Error Get the thrown exception.
generatorException ( ) : Exceptio\Exception | Erro\Error Get the exception thrown from the generator.
generatorResponse ( ) : tuple\null Get the response from the generator.
generatorReturnValue ( ) : mixed Get the value returned from the generator.
hasCompleted ( ) : boolean Returns true if this call has completed.
hasResponded ( ) : boolean Returns true if this call has responded.
index ( ) : integer Get the call index.
isGenerator ( ) : boolean Returns true if this call has responded with a generator.
isIterable ( ) : boolean Returns true if this call has responded with an iterable.
iterableEvents ( ) : array Get the iterable events.
response ( ) : tuple\null Get the response.
responseEvent ( ) : Eloquent\Phony\Call\Event\ResponseEvent | null Get the response event.
responseTime ( ) : float | null Get the time at which the call responded.
returnValue ( ) : mixed Get the returned value.
setEndEvent ( Eloquent\Phony\Call\Event\EndEvent $endEvent ) Set the end event.
setResponseEvent ( Eloquent\Phony\Call\Event\ResponseEvent $responseEvent ) Set the response event.

메소드 상세

addIterableEvent() 공개 메소드

Add an iterable event.
public addIterableEvent ( Eloquent\Phony\Call\Event\IterableEvent $iterableEvent )
$iterableEvent Eloquent\Phony\Call\Event\IterableEvent The iterable event.

argument() 공개 메소드

Negative indices are offset from the end of the list. That is, -1 indicates the last element, and -2 indicates the second last element.
public argument ( integer $index ) : mixed
$index integer The index.
리턴 mixed The argument.

arguments() 공개 메소드

Get the arguments.
public arguments ( ) : Arguments | null
리턴 Arguments | null The arguments.

callback() 공개 메소드

Get the callback.
public callback ( ) : callable
리턴 callable The callback.

calledEvent() 공개 메소드

Get the 'called' event.
public calledEvent ( ) : CalledEvent
리턴 Eloquent\Phony\Call\Event\CalledEvent The 'called' event.

endEvent() 공개 메소드

Get the end event.
public endEvent ( ) : Eloquent\Phony\Call\Event\EndEvent | null
리턴 Eloquent\Phony\Call\Event\EndEvent | null The end event, or null if the call has not yet completed.

endTime() 공개 메소드

When generator spies are in use, a call that returns a generator will not be considered complete until the generator has been completely consumed via iteration. Similarly, when iterable spies are in use, a call that returns an iterable will not be considered complete until the iterable has been completely consumed via iteration.
public endTime ( ) : float | null
리턴 float | null The time at which the call completed, in seconds since the Unix epoch, or null if the call has not yet completed.

exception() 공개 메소드

Get the thrown exception.
public exception ( ) : Exceptio\Exception | Erro\Error
리턴 Exceptio\Exception | Erro\Error The thrown exception.

generatorException() 공개 메소드

Get the exception thrown from the generator.
public generatorException ( ) : Exceptio\Exception | Erro\Error
리턴 Exceptio\Exception | Erro\Error The thrown exception.

generatorResponse() 공개 메소드

Get the response from the generator.
public generatorResponse ( ) : tuple\null
리턴 tuple\null

generatorReturnValue() 공개 메소드

Get the value returned from the generator.
public generatorReturnValue ( ) : mixed
리턴 mixed The returned value.

hasCompleted() 공개 메소드

When generator spies are in use, a call that returns a generator will not be considered complete until the generator has been completely consumed via iteration. Similarly, when iterable spies are in use, a call that returns an iterable will not be considered complete until the iterable has been completely consumed via iteration.
public hasCompleted ( ) : boolean
리턴 boolean True if this call has completed.

hasResponded() 공개 메소드

A call that has responded has returned a value, or thrown an exception.
public hasResponded ( ) : boolean
리턴 boolean True if this call has responded.

index() 공개 메소드

This number tracks the order of this call with respect to other calls made against the same spy.
public index ( ) : integer
리턴 integer The index.

isGenerator() 공개 메소드

Returns true if this call has responded with a generator.
public isGenerator ( ) : boolean
리턴 boolean True if this call has responded with a generator.

isIterable() 공개 메소드

Returns true if this call has responded with an iterable.
public isIterable ( ) : boolean
리턴 boolean True if this call has responded with an iterable.

iterableEvents() 공개 메소드

Get the iterable events.
public iterableEvents ( ) : array
리턴 array

response() 공개 메소드

Get the response.
public response ( ) : tuple\null
리턴 tuple\null

responseEvent() 공개 메소드

Get the response event.
public responseEvent ( ) : Eloquent\Phony\Call\Event\ResponseEvent | null
리턴 Eloquent\Phony\Call\Event\ResponseEvent | null The response event, or null if the call has not yet responded.

responseTime() 공개 메소드

A call that has responded has returned a value, or thrown an exception.
public responseTime ( ) : float | null
리턴 float | null The time at which the call responded, in seconds since the Unix epoch, or null if the call has not yet responded.

returnValue() 공개 메소드

Get the returned value.
public returnValue ( ) : mixed
리턴 mixed The returned value.

setEndEvent() 공개 메소드

Set the end event.
public setEndEvent ( Eloquent\Phony\Call\Event\EndEvent $endEvent )
$endEvent Eloquent\Phony\Call\Event\EndEvent The end event.

setResponseEvent() 공개 메소드

Set the response event.
public setResponseEvent ( Eloquent\Phony\Call\Event\ResponseEvent $responseEvent )
$responseEvent Eloquent\Phony\Call\Event\ResponseEvent The response event.