]> granicus.if.org Git - php/commitdiff
- add more cases for getComment
authorPierre Joye <pajoye@php.net>
Wed, 14 Mar 2007 11:02:29 +0000 (11:02 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 14 Mar 2007 11:02:29 +0000 (11:02 +0000)
ext/zip/tests/oo_getcomment.phpt

index 2bcbe295438f6088400764431a30ff5efceebf73..d05385c7dffceabf9681010110ada57f90de4dff 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Get Comment
+getComment
 --SKIPIF--
 <?php
 /* $Id$ */
@@ -14,13 +14,23 @@ $zip = new ZipArchive;
 if (!$zip->open($file)) {
        exit('failed');
 }
+echo $zip->getArchiveComment() . "\n";
+
 $idx = $zip->locateName('foo');
 echo $zip->getCommentName('foo') . "\n";
 echo $zip->getCommentIndex($idx);
 
+echo $zip->getCommentName('') . "\n";
+echo $zip->getCommentName() . "\n";
+
 $zip->close();
 
 ?>
 --EXPECTF--
+Zip archive comment
 foo comment
 foo comment
+Notice: ZipArchive::getCommentName(): Empty string as entry name in %s on line %d
+
+
+Warning: ZipArchive::getCommentName() expects at least 1 parameter, 0 given in %s on line %d