PHP 클래스 Eloquent\Phony\Stub\StubVerifier

상속: extends Eloquent\Phony\Spy\SpyVerifier, implements Eloquent\Phony\Stub\Stub
파일 보기 프로젝트 열기: eloquent/phony

공개 메소드들

메소드 설명
__construct ( Eloquent\Phony\Stub\Stub $stub, Eloquent\Phony\Spy\Spy $spy, MatcherFactory $matcherFactory, MatcherVerifier $matcherVerifier, GeneratorVerifierFactory $generatorVerifierFactory, IterableVerifierFactory $iterableVerifierFactory, CallVerifierFactory $callVerifierFactory, Eloquent\Phony\Assertion\AssertionRecorder $assertionRecorder, AssertionRenderer $assertionRenderer, GeneratorAnswerBuilderFactory $generatorAnswerBuilderFactory ) Construct a new stub verifier.
calls ( callable $callback ) Add a callback to be called as part of an answer.
callsArgument ( integer $index ) Add an argument callback to be called as part of an answer.
callsArgumentWith ( integer $index, Arguments | array $arguments = [], boolean $prefixSelf = false, boolean $suffixArgumentsObject = false, boolean $suffixArguments = true ) Add an argument callback to be called as part of an answer.
callsWith ( callable $callback, Arguments | array $arguments = [], boolean | null $prefixSelf = null, boolean $suffixArgumentsObject = false, boolean $suffixArguments = true ) Add a callback to be called as part of an answer.
closeRule ( ) Close any existing rule.
defaultAnswerCallback ( ) : callable Get the default answer callback.
does ( callable $callback ) Add a callback as an answer.
doesWith ( callable $callback, Arguments | array $arguments = [], boolean | null $prefixSelf = null, boolean $suffixArgumentsObject = false, boolean $suffixArguments = true ) Add a callback as an answer.
forwards ( Arguments | array $arguments = [], boolean | null $prefixSelf = null, boolean $suffixArgumentsObject = false, boolean $suffixArguments = true ) Add an answer that calls the wrapped callback.
generates ( mixed>\mixed $values = [] ) : Eloquent\Phony\Stub\Answer\Builder\GeneratorAnswerBuilder Add an answer that returns a generator, and return a builder for customizing the generator's behavior.
label ( ) : string | null Get the label.
returns ( mixed $value = null ) Add an answer that returns a value.
returnsArgument ( integer $index ) Add an answer that returns an argument.
returnsSelf ( ) Add an answer that returns the self value.
self ( ) : mixed Get the self value of this stub.
setDefaultAnswerCallback ( callable $defaultAnswerCallback ) Set the callback to use when creating a default answer.
setLabel ( string | null $label ) Set the label.
setSelf ( mixed $self ) Set the self value of this stub.
setsArgument ( mixed $indexOrValue = null, mixed $value = null ) Set the value of an argument passed by reference as part of an answer.
stub ( ) : Eloquent\Phony\Stub\Stub Get the stub.
throws ( Exceptio\Exception | Erro\Error | string | null $exception = null ) Add an answer that throws an exception.
with ( ) Modify the current criteria to match the supplied arguments.

메소드 상세

__construct() 공개 메소드

Construct a new stub verifier.
public __construct ( Eloquent\Phony\Stub\Stub $stub, Eloquent\Phony\Spy\Spy $spy, MatcherFactory $matcherFactory, MatcherVerifier $matcherVerifier, GeneratorVerifierFactory $generatorVerifierFactory, IterableVerifierFactory $iterableVerifierFactory, CallVerifierFactory $callVerifierFactory, Eloquent\Phony\Assertion\AssertionRecorder $assertionRecorder, AssertionRenderer $assertionRenderer, GeneratorAnswerBuilderFactory $generatorAnswerBuilderFactory )
$stub Eloquent\Phony\Stub\Stub The stub.
$spy Eloquent\Phony\Spy\Spy The spy.
$matcherFactory Eloquent\Phony\Matcher\MatcherFactory The matcher factory to use.
$matcherVerifier Eloquent\Phony\Matcher\MatcherVerifier The macther verifier to use.
$generatorVerifierFactory Eloquent\Phony\Verification\GeneratorVerifierFactory The generator verifier factory to use.
$iterableVerifierFactory Eloquent\Phony\Verification\IterableVerifierFactory The iterable verifier factory to use.
$callVerifierFactory Eloquent\Phony\Call\CallVerifierFactory The call verifier factory to use.
$assertionRecorder Eloquent\Phony\Assertion\AssertionRecorder The assertion recorder to use.
$assertionRenderer Eloquent\Phony\Assertion\AssertionRenderer The assertion renderer to use.
$generatorAnswerBuilderFactory Eloquent\Phony\Stub\Answer\Builder\GeneratorAnswerBuilderFactory The generator answer builder factory to use.

calls() 공개 메소드

Note that all supplied callbacks will be called in the same invocation.
public calls ( callable $callback )
$callback callable The callback.

callsArgument() 공개 메소드

Negative indices are offset from the end of the list. That is, -1 indicates the last element, and -2 indicates the second last element. Note that all supplied callbacks will be called in the same invocation.
public callsArgument ( integer $index )
$index integer The argument index.

callsArgumentWith() 공개 메소드

Negative indices are offset from the end of the list. That is, -1 indicates the last element, and -2 indicates the second last element. Note that all supplied callbacks will be called in the same invocation.
public callsArgumentWith ( integer $index, Arguments | array $arguments = [], boolean $prefixSelf = false, boolean $suffixArgumentsObject = false, boolean $suffixArguments = true )
$index integer The argument index.
$arguments Eloquent\Phony\Call\Arguments | array The arguments.
$prefixSelf boolean True if the self value should be prefixed.
$suffixArgumentsObject boolean True if the arguments object should be appended.
$suffixArguments boolean True if the arguments should be appended individually.

callsWith() 공개 메소드

This method supports reference parameters. Note that all supplied callbacks will be called in the same invocation.
public callsWith ( callable $callback, Arguments | array $arguments = [], boolean | null $prefixSelf = null, boolean $suffixArgumentsObject = false, boolean $suffixArguments = true )
$callback callable The callback.
$arguments Eloquent\Phony\Call\Arguments | array The arguments.
$prefixSelf boolean | null True if the self value should be prefixed.
$suffixArgumentsObject boolean True if the arguments object should be appended.
$suffixArguments boolean True if the arguments should be appended individually.

closeRule() 공개 메소드

Close any existing rule.
public closeRule ( )

defaultAnswerCallback() 공개 메소드

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

does() 공개 메소드

Add a callback as an answer.
public does ( callable $callback )
$callback callable The callback.

doesWith() 공개 메소드

Add a callback as an answer.
public doesWith ( callable $callback, Arguments | array $arguments = [], boolean | null $prefixSelf = null, boolean $suffixArgumentsObject = false, boolean $suffixArguments = true )
$callback callable The callback.
$arguments Eloquent\Phony\Call\Arguments | array The arguments.
$prefixSelf boolean | null True if the self value should be prefixed.
$suffixArgumentsObject boolean True if the arguments object should be appended.
$suffixArguments boolean True if the arguments should be appended individually.

forwards() 공개 메소드

Add an answer that calls the wrapped callback.
public forwards ( Arguments | array $arguments = [], boolean | null $prefixSelf = null, boolean $suffixArgumentsObject = false, boolean $suffixArguments = true )
$arguments Eloquent\Phony\Call\Arguments | array The arguments.
$prefixSelf boolean | null True if the self value should be prefixed.
$suffixArgumentsObject boolean True if the arguments object should be appended.
$suffixArguments boolean True if the arguments should be appended individually.

generates() 공개 메소드

Add an answer that returns a generator, and return a builder for customizing the generator's behavior.
public generates ( mixed>\mixed $values = [] ) : Eloquent\Phony\Stub\Answer\Builder\GeneratorAnswerBuilder
$values mixed>\mixed
리턴 Eloquent\Phony\Stub\Answer\Builder\GeneratorAnswerBuilder The answer builder.

label() 공개 메소드

Get the label.
public label ( ) : string | null
리턴 string | null The label.

returns() 공개 메소드

Add an answer that returns a value.
public returns ( mixed $value = null )
$value mixed The return value.

returnsArgument() 공개 메소드

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 returnsArgument ( integer $index )
$index integer The argument index.

returnsSelf() 공개 메소드

Add an answer that returns the self value.
public returnsSelf ( )

self() 공개 메소드

Get the self value of this stub.
public self ( ) : mixed
리턴 mixed The self value.

setDefaultAnswerCallback() 공개 메소드

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

setLabel() 공개 메소드

Set the label.
public setLabel ( string | null $label )
$label string | null The label.

setSelf() 공개 메소드

This value is used by returnsThis().
public setSelf ( mixed $self )
$self mixed The self value.

setsArgument() 공개 메소드

If called with no arguments, sets the first argument to null. If called with one argument, sets the first argument to $indexOrValue. If called with two arguments, sets the argument at $indexOrValue to $value.
public setsArgument ( mixed $indexOrValue = null, mixed $value = null )
$indexOrValue mixed The index, or value if no index is specified.
$value mixed The value.

stub() 공개 메소드

Get the stub.
public stub ( ) : Eloquent\Phony\Stub\Stub
리턴 Eloquent\Phony\Stub\Stub The stub.

throws() 공개 메소드

Add an answer that throws an exception.
public throws ( Exceptio\Exception | Erro\Error | string | null $exception = null )
$exception Exceptio\Exception | Erro\Error | string | null The exception, or message, or null to throw a generic exception.

with() 공개 메소드

Modify the current criteria to match the supplied arguments.
public with ( )