Annotation of embedaddon/php/ext/spl/tests/bug64228.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #64228 (RecursiveDirectoryIterator always assumes SKIP_DOTS)
! 3: --FILE--
! 4: <?php
! 5: $dirs = array();
! 6: $empty_dir = __DIR__ . "/empty";
! 7: @mkdir($empty_dir);
! 8:
! 9: $i = new RecursiveDirectoryIterator($empty_dir, FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO); // Note the absence of FilesystemIterator::SKIP_DOTS
! 10: foreach ($i as $key => $value) {
! 11: $dirs[] = $value->getFileName();
! 12: }
! 13:
! 14: @rmdir($empty_dir);
! 15:
! 16: sort($dirs);
! 17: print_r($dirs);
! 18: ?>
! 19: --EXPECT--
! 20: Array
! 21: (
! 22: [0] => .
! 23: [1] => ..
! 24: )
! 25:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>