PHP Класс Eloquent\Phony\Facade\AbstractFacade

Показать файл Открыть проект

Открытые методы

Метод Описание
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.