summaryrefslogtreecommitdiff
path: root/ext/phar/tests/phar_buildfromdirectory5.phpt
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2013-09-18 10:52:51 +0200
committerMichael Wallner <mike@php.net>2013-09-18 10:52:51 +0200
commit14d53417879256044c40b2ef8d0aa32b1f215acb (patch)
treed02364732fbe548682a7dbe6462eb639972d917f /ext/phar/tests/phar_buildfromdirectory5.phpt
parent6866b45a48a773f434c04828c9d0a05ae9d9cf3f (diff)
downloadphp-git-14d53417879256044c40b2ef8d0aa32b1f215acb.tar.gz
fix test concurrency
Diffstat (limited to 'ext/phar/tests/phar_buildfromdirectory5.phpt')
-rw-r--r--ext/phar/tests/phar_buildfromdirectory5.phpt24
1 files changed, 12 insertions, 12 deletions
diff --git a/ext/phar/tests/phar_buildfromdirectory5.phpt b/ext/phar/tests/phar_buildfromdirectory5.phpt
index 51e5cec691..f20c52ab91 100644
--- a/ext/phar/tests/phar_buildfromdirectory5.phpt
+++ b/ext/phar/tests/phar_buildfromdirectory5.phpt
@@ -8,14 +8,14 @@ phar.readonly=0
--FILE--
<?php
-mkdir(dirname(__FILE__).'/testdir');
+mkdir(dirname(__FILE__).'/testdir5');
foreach(range(1, 4) as $i) {
- file_put_contents(dirname(__FILE__)."/testdir/file$i.txt", "some content for file $i");
+ file_put_contents(dirname(__FILE__)."/testdir5/file$i.txt", "some content for file $i");
}
try {
- $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory.phar');
- $a = $phar->buildFromDirectory(dirname(__FILE__) . '/testdir', '/\.txt/');
+ $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory5.phar');
+ $a = $phar->buildFromDirectory(dirname(__FILE__) . '/testdir5', '/\.txt/');
asort($a);
var_dump($a);
} catch (Exception $e) {
@@ -23,28 +23,28 @@ try {
echo $e->getMessage() . "\n";
}
-var_dump(file_exists(dirname(__FILE__) . '/buildfromdirectory.phar'));
+var_dump(file_exists(dirname(__FILE__) . '/buildfromdirectory5.phar'));
?>
===DONE===
--CLEAN--
<?php
-unlink(dirname(__FILE__) . '/buildfromdirectory.phar');
+unlink(dirname(__FILE__) . '/buildfromdirectory5.phar');
foreach(range(1, 4) as $i) {
- unlink(dirname(__FILE__) . "/testdir/file$i.txt");
+ unlink(dirname(__FILE__) . "/testdir5/file$i.txt");
}
-rmdir(dirname(__FILE__) . '/testdir');
+rmdir(dirname(__FILE__) . '/testdir5');
?>
--EXPECTF--
array(4) {
["file1.txt"]=>
- string(%d) "%stestdir%cfile1.txt"
+ string(%d) "%stestdir5%cfile1.txt"
["file2.txt"]=>
- string(%d) "%stestdir%cfile2.txt"
+ string(%d) "%stestdir5%cfile2.txt"
["file3.txt"]=>
- string(%d) "%stestdir%cfile3.txt"
+ string(%d) "%stestdir5%cfile3.txt"
["file4.txt"]=>
- string(%d) "%stestdir%cfile4.txt"
+ string(%d) "%stestdir5%cfile4.txt"
}
bool(true)
===DONE===