diff options
author | Anatol Belski <ab@php.net> | 2018-07-13 20:13:51 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-07-13 20:13:51 +0200 |
commit | 141072a838b32f4eba33166666209508ef36ccba (patch) | |
tree | cf6e677191d8f6bba7e4dfe6a739c2b81649d22c | |
parent | 99fe18503ad61472ef8f4009a9234bfc2571d027 (diff) | |
download | php-git-141072a838b32f4eba33166666209508ef36ccba.tar.gz |
Improve test
Ensure the filename is non existent indeed.
-rw-r--r-- | ext/zip/tests/bug76524.phpt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/zip/tests/bug76524.phpt b/ext/zip/tests/bug76524.phpt index f28bfc13f2..e087015c3c 100644 --- a/ext/zip/tests/bug76524.phpt +++ b/ext/zip/tests/bug76524.phpt @@ -7,7 +7,10 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$filename = __DIR__ . '/nonexistent.zip'; +$i = 0; +do { + $filename = __DIR__ . "/nonexistent" . ($i++) . ".zip"; +} while (file_exists($filename)); $zip = new ZipArchive(); $zip->open($filename, ZipArchive::CREATE | ZipArchive::OVERWRITE); |