PHP Класс phpmock\generator\MockFunctionGenerator

Автор: Markus Malkusch ([email protected])
Показать файл Открыть проект Примеры использования класса

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

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

Описание методов

__construct() публичный Метод

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

call() публичный статический Метод

Calls the enabled mock, or the built-in function otherwise.
См. также: 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.
Результат mixed The result of the called function.

defineFunction() публичный Метод

Defines the mock function.
public defineFunction ( )

removeDefaultArguments() публичный статический Метод

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