PHP Class phpmock\generator\MockFunctionGenerator

Author: Markus Malkusch ([email protected])
Afficher le fichier Open project: php-mock/php-mock Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Mock $mock ) Sets the mock.
call ( string $functionName, string $fqfn, array &$arguments ) : mixed Calls the enabled mock, or the built-in function otherwise.
defineFunction ( ) Defines the mock function.
removeDefaultArguments ( array &$arguments ) Removes optional arguments.

Method Details

__construct() public méthode

Sets the mock.
public __construct ( Mock $mock )
$mock phpmock\Mock The mock.

call() public static méthode

Calls the enabled mock, or the built-in function otherwise.
See also: Mock::define()
public static call ( string $functionName, string $fqfn, array &$arguments ) : mixed
$functionName string The function name.
$fqfn string The fully qualified function name.
$arguments array The arguments.
Résultat mixed The result of the called function.

defineFunction() public méthode

Defines the mock function.
public defineFunction ( )

removeDefaultArguments() public static méthode

Removes optional arguments.
public static removeDefaultArguments ( array &$arguments )
$arguments array The arguments.