exception_020.phpt 579 B

123456789101112131415
  1. --TEST--
  2. Test that the original class name is present in the error out when extending ErrorException
  3. --FILE--
  4. <?php
  5. class MyErrorException extends ErrorException{}
  6. throw new MyErrorException(new stdClass);
  7. ?>
  8. --EXPECTF--
  9. Fatal error: Uncaught Error: Wrong parameters for MyErrorException([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]]) in %sexception_020.php:%d
  10. Stack trace:
  11. #0 %sexception_020.php(%d): ErrorException->__construct(Object(stdClass))
  12. #1 {main}
  13. thrown in %sexception_020.php on line %d