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

1.1     ! misho       1: --TEST--
        !             2: Test array_intersect() function : error conditions 
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : array array_intersect(array $arr1, array $arr2 [, array $...])
        !             6:  * Description: Returns the entries of arr1 that have values which are present in all the other arguments 
        !             7:  * Source code: ext/standard/array.c
        !             8: */
        !             9: 
        !            10: echo "*** Testing array_intersect() : error conditions ***\n";
        !            11: 
        !            12: // Testing array_intersect() with zero arguments
        !            13: echo "\n-- Testing array_intersect() function with Zero arguments --\n";
        !            14: var_dump( array_intersect() );
        !            15: 
        !            16: // Testing array_intersect() with one less than the expected number of arguments
        !            17: echo "\n-- Testing array_intersect() function with less than expected no. of arguments --\n";
        !            18: $arr1 = array(1, 2);
        !            19: var_dump( array_intersect($arr1) );
        !            20: 
        !            21: echo "Done";
        !            22: ?>
        !            23: --EXPECTF--
        !            24: *** Testing array_intersect() : error conditions ***
        !            25: 
        !            26: -- Testing array_intersect() function with Zero arguments --
        !            27: 
        !            28: Warning: array_intersect(): at least 2 parameters are required, 0 given in %s on line %d
        !            29: NULL
        !            30: 
        !            31: -- Testing array_intersect() function with less than expected no. of arguments --
        !            32: 
        !            33: Warning: array_intersect(): at least 2 parameters are required, 1 given in %s on line %d
        !            34: NULL
        !            35: Done

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