Annotation of embedaddon/php/ext/spl/tests/arrayObject_uksort_error1.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test ArrayObject::uksort() function : wrong arg count 
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : int ArrayObject::uksort(callback cmp_function)
                      6:  * Description: proto int ArrayIterator::uksort(callback cmp_function)
                      7:  Sort the entries by key using 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->uksort();
                     16: } catch (BadMethodCallException $e) {
                     17:        echo $e->getMessage() . "\n";
                     18: }
                     19: 
                     20: try {
                     21:        $ao->uksort(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>