Annotation of embedaddon/php/ext/standard/tests/file/dirname_error.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test dirname() function : error conditions 
        !             3: --CREDITS--
        !             4: Dave Kelsey <d_kelsey@uk.ibm.com>
        !             5: --FILE--
        !             6: <?php
        !             7: /* Prototype  : string dirname(string path)
        !             8:  * Description: Returns the directory name component of the path 
        !             9:  * Source code: ext/standard/string.c
        !            10:  * Alias to functions: 
        !            11:  */
        !            12: 
        !            13: echo "*** Testing dirname() : error conditions ***\n";
        !            14: 
        !            15: // Zero arguments
        !            16: echo "\n-- Testing dirname() function with Zero arguments --\n";
        !            17: var_dump( dirname() );
        !            18: 
        !            19: //Test dirname with one more than the expected number of arguments
        !            20: echo "\n-- Testing dirname() function with more than expected no. of arguments --\n";
        !            21: $path = 'string_val';
        !            22: $extra_arg = 10;
        !            23: var_dump( dirname($path, $extra_arg) );
        !            24: 
        !            25: ?>
        !            26: ===DONE===
        !            27: --EXPECTF--
        !            28: *** Testing dirname() : error conditions ***
        !            29: 
        !            30: -- Testing dirname() function with Zero arguments --
        !            31: 
        !            32: Warning: dirname() expects exactly 1 parameter, 0 given in %s on line %d
        !            33: NULL
        !            34: 
        !            35: -- Testing dirname() function with more than expected no. of arguments --
        !            36: 
        !            37: Warning: dirname() expects exactly 1 parameter, 2 given in %s on line %d
        !            38: NULL
        !            39: ===DONE===
        !            40: 

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