]> granicus.if.org Git - php/commitdiff
- New test
authorFelipe Pena <felipe@php.net>
Mon, 25 Aug 2008 19:38:18 +0000 (19:38 +0000)
committerFelipe Pena <felipe@php.net>
Mon, 25 Aug 2008 19:38:18 +0000 (19:38 +0000)
ext/standard/tests/general_functions/callbacks_002.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/general_functions/callbacks_002.phpt b/ext/standard/tests/general_functions/callbacks_002.phpt
new file mode 100644 (file)
index 0000000..22130c5
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+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));
+
+?>
+--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