summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/zip/tests/oo_addemptydir_error.phpt30
-rw-r--r--ext/zip/tests/oo_namelocate.zipbin344 -> 0 bytes
2 files changed, 30 insertions, 0 deletions
diff --git a/ext/zip/tests/oo_addemptydir_error.phpt b/ext/zip/tests/oo_addemptydir_error.phpt
new file mode 100644
index 0000000000..a1b083ca50
--- /dev/null
+++ b/ext/zip/tests/oo_addemptydir_error.phpt
@@ -0,0 +1,30 @@
+--TEST--
+ziparchive::addEmptyDir error
+--SKIPIF--
+<?php
+/* $Id$ */
+if(!extension_loaded('zip')) die('skip');
+?>
+--FILE--
+<?php
+
+include __DIR__ . '/utils.inc';
+
+$zip = new ZipArchive;
+if (!$zip->open(__DIR__ . '/test.zip', ZipArchive::RDONLY)) {
+ exit('failed');
+}
+
+var_dump($zip->addEmptyDir('emptydir'));
+if ($zip->status == ZipArchive::ER_RDONLY) {
+ echo "OK\n";
+} else if ($zip->status == ZipArchive::ER_OK) {
+ dump_entries_name($zip);
+} else {
+ echo "Lost\n";
+}
+$zip->close();
+?>
+--EXPECTF--
+bool(false)
+OK
diff --git a/ext/zip/tests/oo_namelocate.zip b/ext/zip/tests/oo_namelocate.zip
deleted file mode 100644
index 9754e4c7bf..0000000000
--- a/ext/zip/tests/oo_namelocate.zip
+++ /dev/null
Binary files differ