PHP Class phpmock\spy\Invocation

Author: Markus Malkusch ([email protected])
显示文件 Open project: php-mock/php-mock

Public Methods

Method 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 method

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 method

Returns the arguments of a function call.
public getArguments ( ) : array
return array The arguments.

getException() public method

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

getReturn() public method

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

isExceptionThrown() public method

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