summaryrefslogtreecommitdiff
path: root/ext/zip/tests/zip_entry_close.phpt
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2013-11-04 13:23:36 +0100
committerRemi Collet <remi@php.net>2013-11-04 13:23:36 +0100
commit5dc37b351085a7b8cdc30ef2ebb349c8e5df4e2c (patch)
tree33357220b91d8553c0978e6392385e0fb8e49028 /ext/zip/tests/zip_entry_close.phpt
parent2f555b8e606b5f09d635cef4d3fcbcd6939adae2 (diff)
downloadphp-git-5dc37b351085a7b8cdc30ef2ebb349c8e5df4e2c.tar.gz
Sync ext/zip with pecl/zip version 1.3.2
- update libzip to version 1.11.1. We don't use any private symbol anymore - new method ZipArchive::setPassword($password) - add --with-libzip option to build with system libzip
Diffstat (limited to 'ext/zip/tests/zip_entry_close.phpt')
-rw-r--r--ext/zip/tests/zip_entry_close.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/zip/tests/zip_entry_close.phpt b/ext/zip/tests/zip_entry_close.phpt
new file mode 100644
index 0000000000..82b7819054
--- /dev/null
+++ b/ext/zip/tests/zip_entry_close.phpt
@@ -0,0 +1,24 @@
+--TEST--
+zip_entry_close() function: simple and double call
+--SKIPIF--
+<?php
+/* $Id$ */
+if(!extension_loaded('zip')) die('skip');
+?>
+--FILE--
+<?php
+$zip = zip_open(dirname(__FILE__)."/test_procedural.zip");
+$entry = zip_read($zip);
+echo "entry_open: "; var_dump(zip_entry_open($zip, $entry, "r"));
+echo "entry_close: "; var_dump(zip_entry_close($entry));
+echo "entry_close: "; var_dump(zip_entry_close($entry));
+zip_close($zip);
+?>
+Done
+--EXPECTF--
+entry_open: bool(true)
+entry_close: bool(true)
+entry_close:
+Warning: zip_entry_close(): %d is not a valid Zip Entry resource in %s
+bool(false)
+Done