summaryrefslogtreecommitdiff
path: root/ext/zip/tests/bug8009.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zip/tests/bug8009.phpt')
-rw-r--r--ext/zip/tests/bug8009.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/zip/tests/bug8009.phpt b/ext/zip/tests/bug8009.phpt
new file mode 100644
index 000000000..dd396ebb9
--- /dev/null
+++ b/ext/zip/tests/bug8009.phpt
@@ -0,0 +1,27 @@
+--TEST--
+bug #8009, cannot add again same entry to an archive
+--SKIPIF--
+<?php
+/* $Id: bug8009.phpt,v 1.1 2006/07/24 16:58:58 pajoye Exp $ */
+if(!extension_loaded('zip')) die('skip');
+?>
+--FILE--
+<?php
+$thisdir = dirname(__FILE__);
+$src = $thisdir . "/bug8009.zip";
+$filename = $thisdir . "/tmp8009.zip";
+copy($src, $filename);
+
+$zip = new ZipArchive();
+
+if (!$zip->open($filename)) {
+ exit("cannot open $filename\n");
+}
+$zip->addFromString("2.txt", "=)");
+$zip->close();
+unlink($filename);
+echo "status: " . $zip->status . "\n";
+echo "\n";
+
+--EXPECT--
+status: 0