xref: /PHP-8.0/ext/zip/tests/oo_close.phpt (revision f8d79582)
1--TEST--
2zip::close() function
3--SKIPIF--
4<?php
5if(!extension_loaded('zip')) die('skip');
6?>
7--FILE--
8<?php
9
10$dirname = __DIR__ . '/';
11$zip = new ZipArchive;
12if (!$zip->open($dirname . 'test.zip')) {
13    exit('failed');
14}
15
16if ($zip->status == ZIPARCHIVE::ER_OK) {
17    $zip->close();
18    echo "ok\n";
19} else {
20    echo "failed\n";
21}
22?>
23--EXPECT--
24ok
25