xref: /PHP-8.3/ext/zip/tests/zip_entry_close.phpt (revision 74859783)
1--TEST--
2zip_entry_close() function: simple and double call
3--EXTENSIONS--
4zip
5--FILE--
6<?php
7$zip    = zip_open(__DIR__."/test_procedural.zip");
8$entry  = zip_read($zip);
9echo "entry_open:  "; var_dump(zip_entry_open($zip, $entry, "r"));
10echo "entry_close: "; var_dump(zip_entry_close($entry));
11try {
12    echo "entry_close: "; var_dump(zip_entry_close($entry));
13} catch (TypeError $e) {
14    echo $e->getMessage(), "\n";
15}
16zip_close($zip);
17?>
18Done
19--EXPECTF--
20Deprecated: Function zip_open() is deprecated in %s on line %d
21
22Deprecated: Function zip_read() is deprecated in %s on line %d
23entry_open:
24Deprecated: Function zip_entry_open() is deprecated in %s on line %d
25bool(true)
26entry_close:
27Deprecated: Function zip_entry_close() is deprecated in %s on line %d
28bool(true)
29entry_close:
30Deprecated: Function zip_entry_close() is deprecated in %s on line %d
31zip_entry_close(): supplied resource is not a valid Zip Entry resource
32
33Deprecated: Function zip_close() is deprecated in %s on line %d
34Done
35