Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
Ensure the filename is non existent indeed.
  • Loading branch information
weltling committed Jul 13, 2018
1 parent 99fe185 commit 141072a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ext/zip/tests/bug76524.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 141072a

Please sign in to comment.