xref: /PHP-5.4/ext/zip/tests/bug8009.phpt (revision 1f655451)
1--TEST--
2Bug #8009 (cannot add again same entry to an archive)
3--SKIPIF--
4<?php
5/* $Id$ */
6if(!extension_loaded('zip')) die('skip');
7?>
8--FILE--
9<?php
10$thisdir = dirname(__FILE__);
11$src = $thisdir . "/bug8009.zip";
12$filename = $thisdir . "/tmp8009.zip";
13copy($src, $filename);
14
15$zip = new ZipArchive();
16
17if (!$zip->open($filename)) {
18       exit("cannot open $filename\n");
19}
20$zip->addFromString("2.txt", "=)");
21$zip->close();
22unlink($filename);
23echo "status: " . $zip->status . "\n";
24echo "\n";
25
26--EXPECT--
27status: 0
28