1--TEST--
2This test will test getStatusString method in ZipArchive
3--CREDITS--
4Ole-Petter Wikene <olepw@redpill-linpro.com>
5#PHPTestFest2009 Norway 2009-06-09 \o/
6--SKIPIF--
7<?php if (!extension_loaded("zip")) { echo "skip extension not available"; } ?>
8--FILE--
9<?php
10
11$dirname = dirname(__FILE__) . '/';
12$arch = new ZipArchive;
13$arch->open($dirname.'foo.zip',ZIPARCHIVE::CREATE);
14var_dump($arch->getStatusString());
15//delete an index that does not exist - trigger error
16$arch->deleteIndex(2);
17var_dump($arch->getStatusString());
18$arch->close();
19
20?>
21--CLEAN--
22<?php
23unlink($dirname.'foo.zip');
24?>
25--EXPECT--
26string(8) "No error"
27string(16) "Invalid argument"
28
29