Annotation of embedaddon/php/ext/standard/tests/array/uksort_error.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test uksort() function : error conditions 
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : bool uksort(array array_arg, string cmp_function)
        !             6:  * Description: Sort an array by keys using a user-defined comparison function 
        !             7:  * Source code: ext/standard/array.c
        !             8:  * Alias to functions: 
        !             9:  */
        !            10: 
        !            11: echo "*** Testing uksort() : error conditions ***\n";
        !            12: 
        !            13: echo "\n-- Testing uksort() function with more than expected no. of arguments --\n";
        !            14: $array_arg = array(1, 2);
        !            15: $cmp_function = 'string_val';
        !            16: $extra_arg = 10;
        !            17: var_dump( uksort($array_arg, $cmp_function, $extra_arg) );
        !            18: 
        !            19: echo "\n-- Testing uksort() function with less than expected no. of arguments --\n";
        !            20: $array_arg = array(1, 2);
        !            21: var_dump( uksort($array_arg) );
        !            22: 
        !            23: echo "\n-- Testing uksort() function with zero arguments --\n";
        !            24: var_dump( uksort() );
        !            25: 
        !            26: ?>
        !            27: ===DONE===
        !            28: --EXPECTF--
        !            29: *** Testing uksort() : error conditions ***
        !            30: 
        !            31: -- Testing uksort() function with more than expected no. of arguments --
        !            32: 
        !            33: Warning: uksort() expects exactly 2 parameters, 3 given in %suksort_error.php on line %d
        !            34: NULL
        !            35: 
        !            36: -- Testing uksort() function with less than expected no. of arguments --
        !            37: 
        !            38: Warning: uksort() expects exactly 2 parameters, 1 given in %suksort_error.php on line %d
        !            39: NULL
        !            40: 
        !            41: -- Testing uksort() function with zero arguments --
        !            42: 
        !            43: Warning: uksort() expects exactly 2 parameters, 0 given in %suksort_error.php on line %d
        !            44: NULL
        !            45: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>