phpmock\spy\Spy::__construct PHP Method

__construct() public method

If no function is specified it will use the existing function.
public __construct ( string $namespace, string $name, callable $function = null )
$namespace string The namespace for the mock function.
$name string The function name of the mocked function.
$function callable The mock function, or null for using the existing function.
    public function __construct($namespace, $name, callable $function = null)
    {
        parent::__construct($namespace, $name, $function ?: $name);
    }