exception_020.phpt 498 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 TypeError: ErrorException::__construct(): Argument #1 ($message) must be of type string, stdClass given in %s:%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