PHP 인터페이스 Eloquent\Phony\Mock\Handle\Handle

파일 보기 프로젝트 열기: eloquent/phony 0 사용 예제들

공개 메소드들

메소드 설명
__get ( string $name ) : StubVerifier Get a stub verifier.
checkNoInteraction ( ) : Eloquent\Phony\Event\EventCollection | null Checks if there was no interaction with the mock.
className ( ) : string Get the class name.
clazz ( ) : ReflectionClass Get the class.
defaultAnswerCallback ( ) : callable Get the default answer callback.
full ( ) Turn the mock into a full mock.
noInteraction ( ) : Eloquent\Phony\Event\EventCollection Throws an exception unless there was no interaction with the mock.
partial ( ) Turn the mock into a partial mock.
proxy ( object $object ) Use the supplied object as the implementation for all methods of the mock.
setDefaultAnswerCallback ( callable $defaultAnswerCallback ) Set the callback to use when creating a default answer.
spy ( string $name ) : Eloquent\Phony\Spy\Spy Get a spy.
startRecording ( ) Start recording calls.
state ( ) : stdClass Get the handle state.
stopRecording ( ) Stop recording calls.
stub ( string $name, boolean $isNewRule = true ) : StubVerifier Get a stub verifier.

메소드 상세

__get() 공개 메소드

Using this method will always start a new rule.
public __get ( string $name ) : StubVerifier
$name string The method name.
리턴 Eloquent\Phony\Stub\StubVerifier The stub verifier.

checkNoInteraction() 공개 메소드

Checks if there was no interaction with the mock.
public checkNoInteraction ( ) : Eloquent\Phony\Event\EventCollection | null
리턴 Eloquent\Phony\Event\EventCollection | null The result.

className() 공개 메소드

Get the class name.
public className ( ) : string
리턴 string The class name.

clazz() 공개 메소드

Get the class.
public clazz ( ) : ReflectionClass
리턴 ReflectionClass The class.

defaultAnswerCallback() 공개 메소드

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

full() 공개 메소드

Turn the mock into a full mock.
public full ( )

noInteraction() 공개 메소드

Throws an exception unless there was no interaction with the mock.
public noInteraction ( ) : Eloquent\Phony\Event\EventCollection
리턴 Eloquent\Phony\Event\EventCollection The result.

partial() 공개 메소드

Turn the mock into a partial mock.
public partial ( )

proxy() 공개 메소드

This method may help when partial mocking of a particular implementation is not possible; as in the case of a final class.
public proxy ( object $object )
$object object The object to use.

setDefaultAnswerCallback() 공개 메소드

Set the callback to use when creating a default answer.
public setDefaultAnswerCallback ( callable $defaultAnswerCallback )
$defaultAnswerCallback callable The default answer callback.

spy() 공개 메소드

Get a spy.
public spy ( string $name ) : Eloquent\Phony\Spy\Spy
$name string The method name.
리턴 Eloquent\Phony\Spy\Spy The spy.

startRecording() 공개 메소드

Start recording calls.
public startRecording ( )

state() 공개 메소드

Get the handle state.
public state ( ) : stdClass
리턴 stdClass The state.

stopRecording() 공개 메소드

Stop recording calls.
public stopRecording ( )

stub() 공개 메소드

Get a stub verifier.
public stub ( string $name, boolean $isNewRule = true ) : StubVerifier
$name string The method name.
$isNewRule boolean True if a new rule should be started.
리턴 Eloquent\Phony\Stub\StubVerifier The stub verifier.