Method | Description | |
---|---|---|
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 |
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 |
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 |
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 |
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 = [] ) : |
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 ) : |
Create a new static handle. | |
partialMock ( mixed $types = [], |
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 ) : |
Create a new spy. | |
spyGlobal ( string $function, string $namespace ) : |
Create a spy of a function in the global namespace, and declare it as a function in another namespace. | |
stub ( callable | null $callback = null ) : |
Create a new stub. | |
stubGlobal ( string $function, string $namespace ) : |
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 ) : |
Create a new matcher that matches multiple arguments. |
public static any ( ) : Eloquent\Phony\Matcher\Matcher | ||
return | Eloquent\Phony\Matcher\Matcher | The newly created matcher. |
public static anyOrder ( ) : Eloquent\Phony\Event\EventCollection | ||
return | Eloquent\Phony\Event\EventCollection | The result. |
public static anyOrderSequence ( mixed |
||
$events | mixed |
|
return | Eloquent\Phony\Event\EventCollection | The result. |
public static checkAnyOrder ( ) : Eloquent\Phony\Event\EventCollection | null | ||
return | Eloquent\Phony\Event\EventCollection | null | The result. |
public static checkAnyOrderSequence ( mixed |
||
$events | mixed |
|
return | Eloquent\Phony\Event\EventCollection | null | The result. |
public static checkInOrder ( ) : Eloquent\Phony\Event\EventCollection | null | ||
return | Eloquent\Phony\Event\EventCollection | null | The result. |
public static checkInOrderSequence ( mixed |
||
$events | mixed |
|
return | Eloquent\Phony\Event\EventCollection | null | The result. |
public static inOrder ( ) : Eloquent\Phony\Event\EventCollection | ||
return | Eloquent\Phony\Event\EventCollection | The result. |
public static inOrderSequence ( mixed |
||
$events | mixed |
|
return | Eloquent\Phony\Event\EventCollection | The result. |
public static mockBuilder ( mixed $types = [] ) : |
||
$types | mixed | The types to mock. |
return | The mock builder. |
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. |
return | Eloquent\Phony\Mock\Handle\InstanceHandle | The newly created handle. |
public static onStatic ( Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\Handle | ReflectionClas\ReflectionClass | string $class ) : |
||
$class | Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\Handle | ReflectionClas\ReflectionClass | string | The class. |
return | The newly created handle. |
public static partialMock ( mixed $types = [], |
||
$types | mixed | The types to mock. |
$arguments | The constructor arguments, or null to bypass the constructor. | |
return | Eloquent\Phony\Mock\Handle\InstanceHandle | A handle around the new mock. |
public static restoreGlobalFunctions ( ) |
public static setExportDepth ( integer $depth ) : integer | ||
$depth | integer | The depth. |
return | integer | The previous depth. |
public static setUseColor ( boolean | null $useColor ) | ||
$useColor | boolean | null | True to use color. |
public static stubGlobal ( string $function, string $namespace ) : |
||
$function | string | The name of the function in the global namespace. |
$namespace | string | The namespace in which to create the new function. |
return | The new stub. |
public static wildcard ( mixed $value = null, integer $minimumArguments, integer | null $maximumArguments = null ) : |
||
$value | mixed | The value to check for each argument. |
$minimumArguments | integer | The minimum number of arguments. |
$maximumArguments | integer | null | The maximum number of arguments. |
return | The newly created wildcard matcher. |