function expectsWithCustomExceptionTest($arg1) { expects(bool, $arg1, 1, new \BadFunctionCallException('Function NsplTest\\expectsWithCustomExceptionTest() does not like the given input')); }