summaryrefslogtreecommitdiff
path: root/ext/zip/tests/oo_addfile.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zip/tests/oo_addfile.phpt')
-rw-r--r--ext/zip/tests/oo_addfile.phpt11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/zip/tests/oo_addfile.phpt b/ext/zip/tests/oo_addfile.phpt
index b41e3dbf2c..37320de627 100644
--- a/ext/zip/tests/oo_addfile.phpt
+++ b/ext/zip/tests/oo_addfile.phpt
@@ -20,12 +20,20 @@ if (!$zip->open($file)) {
if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) {
echo "failed\n";
}
+if (!$zip->addFile($dirname . 'utils.inc', 'mini.txt', 12, 34)) {
+ echo "failed\n";
+}
if ($zip->status == ZIPARCHIVE::ER_OK) {
dump_entries_name($zip);
$zip->close();
} else {
echo "failed\n";
}
+if (!$zip->open($file)) {
+ exit('failed');
+}
+var_dump(strlen($zip->getFromName('test.php')) == filesize($dirname . 'utils.inc'));
+var_dump(strlen($zip->getFromName('mini.txt')) == 34);
@unlink($file);
?>
--EXPECT--
@@ -34,3 +42,6 @@ if ($zip->status == ZIPARCHIVE::ER_OK) {
2 foobar/baz
3 entry1.txt
4 test.php
+5 mini.txt
+bool(true)
+bool(true)