\ShmockPolicy

Shmock policies describe rules for how mocks can be constructed. Extend this abstract class and intercept what you need. Failures in each of these methods should trigger an Exception.

Summary

Methods
Properties
Constants
check_method_parameters()
check_method_return_value()
check_method_throws()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

check_method_parameters()

check_method_parameters(string $class, string $method, array $parameters, boolean $static) : void

Parameters

string $class

the class being mocked

string $method

the method being mocked

array $parameters

the parameters to the mocked method

boolean $static

whether the method is static or not.

check_method_return_value()

check_method_return_value(string $class, string $method, mixed|null $return_value, boolean $static) : void

Parameters

string $class
string $method
mixed|null $return_value

the return value that is expected to be returned.

boolean $static

check_method_throws()

check_method_throws(string $class, string $method, \Shmock\Exception $exception, boolean $static) : void

Parameters

string $class
string $method
\Shmock\Exception $exception

the exception that is expected to be thrown

boolean $static