PHP 클래스 Eloquent\Phony\Facade\AbstractFacade

파일 보기 프로젝트 열기: eloquent/phony

공개 메소드들

메소드 설명
any ( ) : Eloquent\Phony\Matcher\Matcher Create a new matcher that matches anything.
anyOrder ( ) : Eloquent\Phony\Event\EventCollection Throws an exception unless at least one event is supplied.
anyOrderSequence ( mixed $events ) : Eloquent\Phony\Event\EventCollection Throws an exception unless the supplied event sequence contains at least one event.
checkAnyOrder ( ) : Eloquent\Phony\Event\EventCollection | null Checks that at least one event is supplied.
checkAnyOrderSequence ( mixed $events ) : Eloquent\Phony\Event\EventCollection | null Checks if the supplied event sequence contains at least one event.
checkInOrder ( ) : Eloquent\Phony\Event\EventCollection | null Checks if the supplied events happened in chronological order.
checkInOrderSequence ( mixed $events ) : Eloquent\Phony\Event\EventCollection | null Checks if the supplied event sequence happened in chronological order.
equalTo ( mixed $value ) : Eloquent\Phony\Matcher\Matcher Create a new equal to matcher.
inOrder ( ) : Eloquent\Phony\Event\EventCollection Throws an exception unless the supplied events happened in chronological order.
inOrderSequence ( mixed $events ) : Eloquent\Phony\Event\EventCollection Throws an exception unless the supplied event sequence happened in chronological order.
mock ( mixed $types = [] ) : Eloquent\Phony\Mock\Handle\InstanceHandle Create a new full mock, and return a handle.
mockBuilder ( mixed $types = [] ) : MockBuilder Create a new mock builder.
on ( Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\InstanceHandle $mock ) : Eloquent\Phony\Mock\Handle\InstanceHandle Create a new handle.
onStatic ( Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\Handle | ReflectionClas\ReflectionClass | string $class ) : StaticHandle Create a new static handle.
partialMock ( mixed $types = [], Arguments | array | null $arguments = [] ) : Eloquent\Phony\Mock\Handle\InstanceHandle Create a new partial mock, and return a handle.
restoreGlobalFunctions ( ) Restores the behavior of any functions in the global namespace that have been altered via spyGlobal() or stubGlobal().
setExportDepth ( integer $depth ) : integer Set the default export depth.
setUseColor ( boolean | null $useColor ) Turn on or off the use of ANSI colored output.
spy ( callable | null $callback = null ) : SpyVerifier Create a new spy.
spyGlobal ( string $function, string $namespace ) : SpyVerifier Create a spy of a function in the global namespace, and declare it as a function in another namespace.
stub ( callable | null $callback = null ) : StubVerifier Create a new stub.
stubGlobal ( string $function, string $namespace ) : StubVerifier Create a stub of a function in the global namespace, and declare it as a function in another namespace.
wildcard ( mixed $value = null, integer $minimumArguments, integer | null $maximumArguments = null ) : WildcardMatcher Create a new matcher that matches multiple arguments.

메소드 상세

any() 공개 정적인 메소드

Create a new matcher that matches anything.
public static any ( ) : Eloquent\Phony\Matcher\Matcher
리턴 Eloquent\Phony\Matcher\Matcher The newly created matcher.

anyOrder() 공개 정적인 메소드

Throws an exception unless at least one event is supplied.
public static anyOrder ( ) : Eloquent\Phony\Event\EventCollection
리턴 Eloquent\Phony\Event\EventCollection The result.

anyOrderSequence() 공개 정적인 메소드

Throws an exception unless the supplied event sequence contains at least one event.
public static anyOrderSequence ( mixed $events ) : Eloquent\Phony\Event\EventCollection
$events mixed
리턴 Eloquent\Phony\Event\EventCollection The result.

checkAnyOrder() 공개 정적인 메소드

Checks that at least one event is supplied.
public static checkAnyOrder ( ) : Eloquent\Phony\Event\EventCollection | null
리턴 Eloquent\Phony\Event\EventCollection | null The result.

checkAnyOrderSequence() 공개 정적인 메소드

Checks if the supplied event sequence contains at least one event.
public static checkAnyOrderSequence ( mixed $events ) : Eloquent\Phony\Event\EventCollection | null
$events mixed
리턴 Eloquent\Phony\Event\EventCollection | null The result.

checkInOrder() 공개 정적인 메소드

Checks if the supplied events happened in chronological order.
public static checkInOrder ( ) : Eloquent\Phony\Event\EventCollection | null
리턴 Eloquent\Phony\Event\EventCollection | null The result.

checkInOrderSequence() 공개 정적인 메소드

Checks if the supplied event sequence happened in chronological order.
public static checkInOrderSequence ( mixed $events ) : Eloquent\Phony\Event\EventCollection | null
$events mixed
리턴 Eloquent\Phony\Event\EventCollection | null The result.

equalTo() 공개 정적인 메소드

Create a new equal to matcher.
public static equalTo ( mixed $value ) : Eloquent\Phony\Matcher\Matcher
$value mixed The value to check.
리턴 Eloquent\Phony\Matcher\Matcher The newly created matcher.

inOrder() 공개 정적인 메소드

Throws an exception unless the supplied events happened in chronological order.
public static inOrder ( ) : Eloquent\Phony\Event\EventCollection
리턴 Eloquent\Phony\Event\EventCollection The result.

inOrderSequence() 공개 정적인 메소드

Throws an exception unless the supplied event sequence happened in chronological order.
public static inOrderSequence ( mixed $events ) : Eloquent\Phony\Event\EventCollection
$events mixed
리턴 Eloquent\Phony\Event\EventCollection The result.

mock() 공개 정적인 메소드

Each value in $types can be either a class name, or an ad hoc mock definition. If only a single type is being mocked, the class name or definition can be passed without being wrapped in an array.
public static mock ( mixed $types = [] ) : Eloquent\Phony\Mock\Handle\InstanceHandle
$types mixed The types to mock.
리턴 Eloquent\Phony\Mock\Handle\InstanceHandle A handle around the new mock.

mockBuilder() 공개 정적인 메소드

Each value in $types can be either a class name, or an ad hoc mock definition. If only a single type is being mocked, the class name or definition can be passed without being wrapped in an array.
public static mockBuilder ( mixed $types = [] ) : MockBuilder
$types mixed The types to mock.
리턴 Eloquent\Phony\Mock\Builder\MockBuilder The mock builder.

on() 공개 정적인 메소드

Create a new handle.
public static on ( Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\InstanceHandle $mock ) : Eloquent\Phony\Mock\Handle\InstanceHandle
$mock Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\InstanceHandle The mock.
리턴 Eloquent\Phony\Mock\Handle\InstanceHandle The newly created handle.

onStatic() 공개 정적인 메소드

Create a new static handle.
public static onStatic ( Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\Handle | ReflectionClas\ReflectionClass | string $class ) : StaticHandle
$class Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\Handle | ReflectionClas\ReflectionClass | string The class.
리턴 Eloquent\Phony\Mock\Handle\StaticHandle The newly created handle.

partialMock() 공개 정적인 메소드

Each value in $types can be either a class name, or an ad hoc mock definition. If only a single type is being mocked, the class name or definition can be passed without being wrapped in an array. Omitting $arguments will cause the original constructor to be called with an empty argument list. However, if a null value is supplied for $arguments, the original constructor will not be called at all.
public static partialMock ( mixed $types = [], Arguments | array | null $arguments = [] ) : Eloquent\Phony\Mock\Handle\InstanceHandle
$types mixed The types to mock.
$arguments Eloquent\Phony\Call\Arguments | array | null The constructor arguments, or null to bypass the constructor.
리턴 Eloquent\Phony\Mock\Handle\InstanceHandle A handle around the new mock.

restoreGlobalFunctions() 공개 정적인 메소드

Restores the behavior of any functions in the global namespace that have been altered via spyGlobal() or stubGlobal().
public static restoreGlobalFunctions ( )

setExportDepth() 공개 정적인 메소드

Negative depths are treated as infinite depth.
public static setExportDepth ( integer $depth ) : integer
$depth integer The depth.
리턴 integer The previous depth.

setUseColor() 공개 정적인 메소드

Pass null to detect automatically.
public static setUseColor ( boolean | null $useColor )
$useColor boolean | null True to use color.

spy() 공개 정적인 메소드

Create a new spy.
public static spy ( callable | null $callback = null ) : SpyVerifier
$callback callable | null The callback, or null to create an anonymous spy.
리턴 Eloquent\Phony\Spy\SpyVerifier The new spy.

spyGlobal() 공개 정적인 메소드

Create a spy of a function in the global namespace, and declare it as a function in another namespace.
public static spyGlobal ( string $function, string $namespace ) : SpyVerifier
$function string The name of the function in the global namespace.
$namespace string The namespace in which to create the new function.
리턴 Eloquent\Phony\Spy\SpyVerifier The new spy.

stub() 공개 정적인 메소드

Create a new stub.
public static stub ( callable | null $callback = null ) : StubVerifier
$callback callable | null The callback, or null to create an anonymous stub.
리턴 Eloquent\Phony\Stub\StubVerifier The new stub.

stubGlobal() 공개 정적인 메소드

Stubs created via this function do not forward to the original function by default. This differs from stubs created by other methods.
public static stubGlobal ( string $function, string $namespace ) : StubVerifier
$function string The name of the function in the global namespace.
$namespace string The namespace in which to create the new function.
리턴 Eloquent\Phony\Stub\StubVerifier The new stub.

wildcard() 공개 정적인 메소드

Create a new matcher that matches multiple arguments.
public static wildcard ( mixed $value = null, integer $minimumArguments, integer | null $maximumArguments = null ) : WildcardMatcher
$value mixed The value to check for each argument.
$minimumArguments integer The minimum number of arguments.
$maximumArguments integer | null The maximum number of arguments.
리턴 Eloquent\Phony\Matcher\WildcardMatcher The newly created wildcard matcher.