diff options
Diffstat (limited to 'ext/reflection/tests/ReflectionExtension_constructor_error.phpt')
-rw-r--r-- | ext/reflection/tests/ReflectionExtension_constructor_error.phpt | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt index 9eae206c50..f731ab51cc 100644 --- a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt +++ b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt @@ -5,12 +5,32 @@ Gerrit "Remi" te Sligte <remi@wolerized.com> Leon Luijkx <leon@phpgg.nl> --FILE-- <?php -$obj = new ReflectionExtension(); -$test = $obj instanceof ReflectionExtension; -var_dump($test); +try { + $obj = new ReflectionExtension(); +} +catch(ReflectionException $re) { + echo "Ok - ".$re->getMessage().PHP_EOL; +} + +try { + $obj = new ReflectionExtension('foo', 'bar'); +} +catch(ReflectionException $re) { + echo "Ok - ".$re->getMessage().PHP_EOL; +} + +try { + $obj = new ReflectionExtension([]); +} +catch(ReflectionException $re) { + echo "Ok - ".$re->getMessage().PHP_EOL; +} + + ?> ==DONE== --EXPECTF-- -Warning: ReflectionExtension::__construct() expects exactly %d parameter, %d given in %s.php on line %d -bool(true) +Ok - ReflectionExtension::__construct() expects exactly %d parameter, %d given +Ok - ReflectionExtension::__construct() expects exactly %d parameter, %d given +Ok - ReflectionExtension::__construct() expects parameter 1 to be string, array given ==DONE== |