Свойство | Тип | Описание | |
---|---|---|---|
$class | |||
$mock | |||
$state |
Метод | Описание | |
---|---|---|
__construct ( ReflectionClass $class, stdClass $state, ReflectionMethod $callParentMethod = null, ReflectionMethod $callTraitMethod = null, ReflectionMethod $callMagicMethod = null, Eloquent\Phony\Mock\Mock $mock = null, |
Construct a new handle. | |
__get ( string $name ) : |
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. | |
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 ) : |
Get a stub verifier. |
Метод | Описание | |
---|---|---|
createStub ( string $name ) : |
Create a new stub verifier. |
public __construct ( ReflectionClass $class, stdClass $state, ReflectionMethod $callParentMethod = null, ReflectionMethod $callTraitMethod = null, ReflectionMethod $callMagicMethod = null, Eloquent\Phony\Mock\Mock $mock = null, |
||
$class | ReflectionClass | The class. |
$state | stdClass | The state. |
$callParentMethod | ReflectionMethod | The call parent method, or null if no parent class exists. |
$callTraitMethod | ReflectionMethod | The call trait method, or null if no trait methods are implemented. |
$callMagicMethod | ReflectionMethod | The call magic method, or null if magic calls are not supported. |
$mock | Eloquent\Phony\Mock\Mock | The mock, or null if this is a static handle. |
$stubFactory | The stub factory to use. | |
$stubVerifierFactory | The stub verifier factory to use. | |
$assertionRenderer | The assertion renderer to use. | |
$assertionRecorder | Eloquent\Phony\Assertion\AssertionRecorder | The assertion recorder to use. |
$invoker | The invoker to use. |
public checkNoInteraction ( ) : Eloquent\Phony\Event\EventCollection | null | ||
Результат | Eloquent\Phony\Event\EventCollection | null | The result. |
public clazz ( ) : ReflectionClass | ||
Результат | ReflectionClass | The class. |
protected createStub ( string $name ) : |
||
$name | string | The method name. |
Результат | The stub verifier. |
public defaultAnswerCallback ( ) : callable | ||
Результат | callable | The default answer callback. |
public noInteraction ( ) : Eloquent\Phony\Event\EventCollection | ||
Результат | Eloquent\Phony\Event\EventCollection | The result. |
public setDefaultAnswerCallback ( callable $defaultAnswerCallback ) | ||
$defaultAnswerCallback | callable | The default answer callback. |
public state ( ) : stdClass | ||
Результат | stdClass | The state. |