Skip to content

Commit 46d5a9b

Browse files
committed
Avoid concurrent directory writes in FilesystemIterator test
The test directory is often used for temporary files, let's use the source directory, which should be more stable. If that doesn't work we need to create a temporary directory.
1 parent cb9bb14 commit 46d5a9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/spl/tests/dit_005.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
SPL: FilesystemIterator and clone
33
--FILE--
44
<?php
5-
$a = new FileSystemIterator(__DIR__);
5+
// Let's hope nobody writes into this directory while testing...
6+
$a = new FileSystemIterator(__DIR__ . '/..');
67
$b = clone $a;
78
var_dump((string)$b == (string)$a);
89
var_dump($a->key() == $b->key());

0 commit comments

Comments
 (0)