Annotation of embedaddon/php/ext/standard/tests/dir/opendir_error2.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test opendir() function : error conditions - Non-existent directory
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : mixed opendir(string $path[, resource $context])
                      6:  * Description: Open a directory and return a dir_handle 
                      7:  * Source code: ext/standard/dir.c
                      8:  */
                      9: 
                     10: /*
                     11:  * Pass a non-existent directory as $path argument to opendir() to test behaviour
                     12:  */
                     13: 
                     14: echo "*** Testing opendir() : error conditions ***\n";
                     15: 
                     16: echo "\n-- Pass a non-existent absolute path: --\n";
                     17: $path = dirname(__FILE__) . "/idonotexist";
                     18: var_dump(opendir($path));
                     19: 
                     20: echo "\n-- Pass a non-existent relative path: --\n";
                     21: chdir(dirname(__FILE__));
                     22: var_dump(opendir('idonotexist'));
                     23: ?>
                     24: ===DONE===
                     25: --EXPECTF--
                     26: *** Testing opendir() : error conditions ***
                     27: 
                     28: -- Pass a non-existent absolute path: --
                     29: 
                     30: Warning: opendir(%s/idonotexist): failed to open dir: %s in %s on line %d
                     31: bool(false)
                     32: 
                     33: -- Pass a non-existent relative path: --
                     34: 
                     35: Warning: opendir(idonotexist): failed to open dir: %s in %s on line %d
                     36: bool(false)
                     37: ===DONE===

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