Skip to content

Commit 141072a

Browse files
committed
Improve test
Ensure the filename is non existent indeed.
1 parent 99fe185 commit 141072a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/zip/tests/bug76524.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ if(!extension_loaded('zip')) die('skip');
77
--FILE--
88
<?php
99

10-
$filename = __DIR__ . '/nonexistent.zip';
10+
$i = 0;
11+
do {
12+
$filename = __DIR__ . "/nonexistent" . ($i++) . ".zip";
13+
} while (file_exists($filename));
1114

1215
$zip = new ZipArchive();
1316
$zip->open($filename, ZipArchive::CREATE | ZipArchive::OVERWRITE);

0 commit comments

Comments
 (0)