public function errorOn($method, $error = 'A mock error', $args = false, $severity = E_USER_ERROR)
    {
        $this->dieOnNoMethod($method, 'error on');
        $this->actions->register($method, $args, new SimpleErrorThrower($error, $severity));
    }
public function errorOn($method, $error = 'A mock error', $args = false, $severity = E_USER_ERROR)
    {
        $this->dieOnNoMethod($method, 'error on');
        $this->actions->register($method, $args, new SimpleErrorThrower($error, $severity));
    }
public function errorOn ( $ method , $ error = 'A mock error' , $ args = false , $ severity = E_USER_ERROR ) { $ this -> dieOnNoMethod ( $ method , 'error on' ) ; $ this -> actions -> register ( $ method , $ args , new SimpleErrorThrower ( $ error , $ severity ) ) ; }
Sets up a trigger to throw an error upon the method call.

@param string $method   Method name to throw on.
@param object $error    Error message to trigger.
@param array  $args     Optional argument list filter.
If given then the exception
will only be thrown if the
method call matches the arguments.
@param int    $severity The PHP severity level. Defaults to E_USER_ERROR.
Sets up a trigger to throw an error upon the method call .