diff options
Diffstat (limited to 'ext/reflection/tests/ReflectionMethod_006.phpt')
| -rw-r--r-- | ext/reflection/tests/ReflectionMethod_006.phpt | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/ext/reflection/tests/ReflectionMethod_006.phpt b/ext/reflection/tests/ReflectionMethod_006.phpt index a5164190ca..627dc96f32 100644 --- a/ext/reflection/tests/ReflectionMethod_006.phpt +++ b/ext/reflection/tests/ReflectionMethod_006.phpt @@ -6,8 +6,16 @@ Steve Seear <stevseea@php.net> --FILE-- <?php -var_dump(new ReflectionMethod()); -var_dump(new ReflectionMethod('a', 'b', 'c')); +try { + new ReflectionMethod(); +} catch (TypeError $re) { + echo "Ok - ".$re->getMessage().PHP_EOL; +} +try { + new ReflectionMethod('a', 'b', 'c'); +} catch (TypeError $re) { + echo "Ok - ".$re->getMessage().PHP_EOL; +} class C { public function f() {} @@ -35,21 +43,8 @@ var_dump($rm->getName(1)); ?> --EXPECTF-- -Warning: ReflectionMethod::__construct() expects exactly 1 parameter, 0 given in %s on line %d -object(ReflectionMethod)#%d (2) { - ["name"]=> - string(0) "" - ["class"]=> - string(0) "" -} - -Warning: ReflectionMethod::__construct() expects exactly 1 parameter, 3 given in %s on line %d -object(ReflectionMethod)#%d (2) { - ["name"]=> - string(0) "" - ["class"]=> - string(0) "" -} +Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 0 given +Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 3 given Warning: ReflectionMethod::isFinal() expects exactly 0 parameters, 1 given in %s on line %d NULL |
