Annotation of embedaddon/php/ext/spl/tests/bug62433.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #62433 Inconsistent behavior of RecursiveDirectoryIterator to dot files (. and ..)
! 3: --FILE--
! 4: <?php
! 5: $dots = array_keys(iterator_to_array(new RecursiveDirectoryIterator(__DIR__)));
! 6: $ndots = array_keys(iterator_to_array(new RecursiveDirectoryIterator(__DIR__, FilesystemIterator::SKIP_DOTS)));
! 7:
! 8: var_dump(in_array(__DIR__ . DIRECTORY_SEPARATOR . '.', $dots));
! 9: var_dump(in_array(__DIR__ . DIRECTORY_SEPARATOR . '..', $dots));
! 10:
! 11: var_dump(in_array(__DIR__ . DIRECTORY_SEPARATOR . '.', $ndots));
! 12: var_dump(in_array(__DIR__ . DIRECTORY_SEPARATOR . '..', $ndots));
! 13: ?>
! 14: --EXPECT--
! 15: bool(true)
! 16: bool(true)
! 17: bool(false)
! 18: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>