Annotation of embedaddon/php/ext/spl/tests/arrayObject_uasort_error1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test ArrayObject::uasort() function : wrong arg count
3: --FILE--
4: <?php
5: /* Prototype : int ArrayObject::uasort(callback cmp_function)
6: * Description: proto int ArrayIterator::uasort(callback cmp_function)
7: Sort the entries by values user defined function.
8: * Source code: ext/spl/spl_array.c
9: * Alias to functions:
10: */
11:
12: $ao = new ArrayObject();
13:
14: try {
15: $ao->uasort();
16: } catch (BadMethodCallException $e) {
17: echo $e->getMessage() . "\n";
18: }
19:
20: try {
21: $ao->uasort(1,2);
22: } catch (BadMethodCallException $e) {
23: echo $e->getMessage() . "\n";
24: }
25: ?>
26: ===DONE===
27: --EXPECTF--
28: Function expects exactly one argument
29: Function expects exactly one argument
30: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>