diff options
Diffstat (limited to 'ext/reflection/tests/request38992.phpt')
-rw-r--r-- | ext/reflection/tests/request38992.phpt | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/ext/reflection/tests/request38992.phpt b/ext/reflection/tests/request38992.phpt index 8c0052fd85..e6eab83415 100644 --- a/ext/reflection/tests/request38992.phpt +++ b/ext/reflection/tests/request38992.phpt @@ -11,12 +11,17 @@ class MyClass } $r = new ReflectionMethod('MyClass', 'doSomething'); -$r->invoke('WTF?'); -$r->invokeArgs('WTF?', array()); +try { + $r->invoke('WTF?'); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} +try { + $r->invokeArgs('WTF?', array()); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} ?> -===DONE=== ---EXPECTF-- -Warning: ReflectionMethod::invoke() expects parameter 1 to be object, string given in %s%erequest38992.php on line %d - -Warning: ReflectionMethod::invokeArgs() expects parameter 1 to be object, string given in %s%erequest38992.php on line %d -===DONE=== +--EXPECT-- +ReflectionMethod::invoke() expects parameter 1 to be object, string given +ReflectionMethod::invokeArgs() expects parameter 1 to be object, string given |