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