From: Aaron Piotrowski Date: Thu, 18 Jun 2015 00:49:02 +0000 (-0500) Subject: Add tests with invalid Error construction params X-Git-Tag: php-7.0.0alpha2~2^2~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4fb362704cca3458b1ac500943415569c3c34ce8;p=php Add tests with invalid Error construction params --- diff --git a/Zend/tests/exception_021.phpt b/Zend/tests/exception_021.phpt new file mode 100644 index 0000000000..5955e7989b --- /dev/null +++ b/Zend/tests/exception_021.phpt @@ -0,0 +1,15 @@ +--TEST-- +Testing throw exception doesn't crash with wrong params, variant 3 +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Wrong parameters for Hello([string $message [, long $code [, Throwable $previous = NULL]]]) in %sexception_021.php:%d +Stack trace: +#0 %sexception_021.php(%d): Error->__construct(Object(stdClass)) +#1 {main} + thrown in %sexception_021.php on line %d diff --git a/Zend/tests/exception_022.phpt b/Zend/tests/exception_022.phpt new file mode 100644 index 0000000000..83d47145c3 --- /dev/null +++ b/Zend/tests/exception_022.phpt @@ -0,0 +1,14 @@ +--TEST-- +Testing throw exception doesn't crash with wrong params, variant 4 +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Wrong parameters for Error([string $message [, long $code [, Throwable $previous = NULL]]]) in %sexception_022.php:%d +Stack trace: +#0 %sexception_022.php(%d): Error->__construct(Object(stdClass)) +#1 {main} + thrown in %sexception_022.php on line %d