xref: /PHP-7.4/Zend/tests/exception_020.phpt (revision e665b276)
1--TEST--
2Test that the original class name is present in the error out when extending ErrorException
3--FILE--
4<?php
5
6class MyErrorException extends ErrorException{}
7throw new MyErrorException(new stdClass);
8
9?>
10--EXPECTF--
11Fatal 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
12Stack trace:
13#0 %sexception_020.php(%d): ErrorException->__construct(Object(stdClass))
14#1 {main}
15  thrown in %sexception_020.php on line %d
16