summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-05 09:58:59 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-05 09:58:59 +0200
commit46d5a9bef9d4da8c845506beba492134a133851a (patch)
treef42387e68f0c5313ae4604bd35a80620d10219c8
parentcb9bb146d96e822db8bf0f84b3acf1132551250e (diff)
downloadphp-git-46d5a9bef9d4da8c845506beba492134a133851a.tar.gz
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.
-rw-r--r--ext/spl/tests/dit_005.phpt3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/spl/tests/dit_005.phpt b/ext/spl/tests/dit_005.phpt
index 9278a115a3..942a58d4ae 100644
--- a/ext/spl/tests/dit_005.phpt
+++ b/ext/spl/tests/dit_005.phpt
@@ -2,7 +2,8 @@
SPL: FilesystemIterator and clone
--FILE--
<?php
-$a = new FileSystemIterator(__DIR__);
+// Let's hope nobody writes into this directory while testing...
+$a = new FileSystemIterator(__DIR__ . '/..');
$b = clone $a;
var_dump((string)$b == (string)$a);
var_dump($a->key() == $b->key());