PHP Class phpmock\spy\Invocation

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

Méthodes publiques

Méthode Description
__construct ( array $arguments, mixed $return, Exception $exception = null ) Sets the arguments and return value
getArguments ( ) : array Returns the arguments of a function call.
getException ( ) : Exception | null Return the exception which was thrown by the spied function.
getReturn ( ) : mixed Returns the return value of a function call.
isExceptionThrown ( ) : boolean Returns if the spied function threw an exception.

Method Details

__construct() public méthode

Sets the arguments and return value
public __construct ( array $arguments, mixed $return, Exception $exception = null )
$arguments array Function's arguments
$return mixed Function's return value
$exception Exception The exception thrown by the function

getArguments() public méthode

Returns the arguments of a function call.
public getArguments ( ) : array
Résultat array The arguments.

getException() public méthode

Return the exception which was thrown by the spied function.
public getException ( ) : Exception | null
Résultat Exception | null function's exception or null if none was thrown

getReturn() public méthode

Returns the return value of a function call.
public getReturn ( ) : mixed
Résultat mixed The return value.

isExceptionThrown() public méthode

Returns if the spied function threw an exception.
public isExceptionThrown ( ) : boolean
Résultat boolean TRUE if an exception was thrown.