diff options
Diffstat (limited to 'ext/standard/tests/general_functions/callbacks_002.phpt')
-rw-r--r-- | ext/standard/tests/general_functions/callbacks_002.phpt | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/ext/standard/tests/general_functions/callbacks_002.phpt b/ext/standard/tests/general_functions/callbacks_002.phpt index 22130c524a..0d44035e0e 100644 --- a/ext/standard/tests/general_functions/callbacks_002.phpt +++ b/ext/standard/tests/general_functions/callbacks_002.phpt @@ -3,14 +3,24 @@ call_user_func(): Wrong parameters --FILE-- <?php -call_user_func(array('Foo', 'bar')); -call_user_func(array(NULL, 'bar')); -call_user_func(array('stdclass', NULL)); +try { + call_user_func(array('Foo', 'bar')); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} +try { + call_user_func(array(NULL, 'bar')); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} +try { + call_user_func(array('stdclass', NULL)); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} ?> --EXPECTF-- -Warning: call_user_func() expects parameter 1 to be a valid callback, class 'Foo' not found in %s on line %d - -Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d - -Warning: call_user_func() expects parameter 1 to be a valid callback, second array member is not a valid method in %s on line %d +call_user_func() expects parameter 1 to be a valid callback, class 'Foo' not found +call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object +call_user_func() expects parameter 1 to be a valid callback, second array member is not a valid method |