Annotation of embedaddon/php/ext/standard/tests/dir/dir_variation5.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test dir() function : usage variations - open a file instead of directory
        !             3: --FILE--
        !             4: <?php
        !             5: /* 
        !             6:  * Prototype  : object dir(string $directory[, resource $context])
        !             7:  * Description: Directory class with properties, handle and class and methods read, rewind and close
        !             8:  * Source code: ext/standard/dir.c
        !             9:  */
        !            10: 
        !            11: /*
        !            12:  * Passing a file as argument to dir() function instead of a directory 
        !            13:  * and checking if proper warning message is generated.
        !            14:  */
        !            15: 
        !            16: echo "*** Testing dir() : open a file instead of a directory ***\n";
        !            17: 
        !            18: // open the file instead of directory
        !            19: $d = dir(__FILE__);
        !            20: var_dump( $d );
        !            21: 
        !            22: echo "Done";
        !            23: ?>
        !            24: --EXPECTF--
        !            25: *** Testing dir() : open a file instead of a directory ***
        !            26: 
        !            27: Warning: dir(%s): failed to open dir: %s in %s on line %d
        !            28: bool(false)
        !            29: Done

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