Skip to content

Commit 7fc0663

Browse files
committed
add test
1 parent 846e52b commit 7fc0663

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
--TEST--
2+
ziparchive::addEmptyDir error
3+
--SKIPIF--
4+
<?php
5+
/* $Id$ */
6+
if(!extension_loaded('zip')) die('skip');
7+
?>
8+
--FILE--
9+
<?php
10+
11+
include __DIR__ . '/utils.inc';
12+
13+
$zip = new ZipArchive;
14+
if (!$zip->open(__DIR__ . '/test.zip', ZipArchive::RDONLY)) {
15+
exit('failed');
16+
}
17+
18+
var_dump($zip->addEmptyDir('emptydir'));
19+
if ($zip->status == ZipArchive::ER_RDONLY) {
20+
echo "OK\n";
21+
} else if ($zip->status == ZipArchive::ER_OK) {
22+
dump_entries_name($zip);
23+
} else {
24+
echo "Lost\n";
25+
}
26+
$zip->close();
27+
?>
28+
--EXPECTF--
29+
bool(false)
30+
OK

ext/zip/tests/oo_namelocate.zip

-344 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)