Annotation of embedaddon/php/ext/zip/tests/oo_getstatusstring.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: This test will test getStatusString method in ZipArchive
                      3: --CREDITS--
                      4: Ole-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);
                     14: var_dump($arch->getStatusString());
                     15: //delete an index that does not exist - trigger error
                     16: $arch->deleteIndex(2);
                     17: var_dump($arch->getStatusString());
                     18: $arch->close();
                     19: 
                     20: ?>
                     21: --CLEAN--
                     22: <?php
                     23: unlink($dirname.'foo.zip');
                     24: ?>
                     25: --EXPECT--
                     26: string(8) "No error"
                     27: string(16) "Invalid argument"
                     28: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>