Annotation of embedaddon/php/ext/standard/tests/dir/chdir_error2.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test chdir() function : error conditions - Non-existent directory
! 3: --FILE--
! 4: <?php
! 5: /* Prototype : bool chdir(string $directory)
! 6: * Description: Change the current directory
! 7: * Source code: ext/standard/dir.c
! 8: */
! 9:
! 10: /*
! 11: * Pass a directory that does not exist as $directory to chdir() to test behaviour
! 12: */
! 13:
! 14: echo "*** Testing chdir() : error conditions ***\n";
! 15:
! 16: $directory = __FILE__ . '/idonotexist';
! 17:
! 18: var_dump(chdir($directory));
! 19: ?>
! 20: ===DONE===
! 21: --EXPECTF--
! 22: *** Testing chdir() : error conditions ***
! 23:
! 24: Warning: chdir(): %s (errno %d) in %s on line %d
! 25: bool(false)
! 26: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>