summaryrefslogtreecommitdiff
path: root/ext/zip
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2007-03-14 11:02:29 +0000
committerPierre Joye <pajoye@php.net>2007-03-14 11:02:29 +0000
commit4f5303ab925c5284decfe47dbaa31a2b9a1b8d5b (patch)
treed33626a4dc2af9eea471e865e33fb46a5b0282e0 /ext/zip
parent9c62ddde343129e7f191039d1d5a49bb3b1bb0b8 (diff)
downloadphp-git-4f5303ab925c5284decfe47dbaa31a2b9a1b8d5b.tar.gz
- add more cases for getComment
Diffstat (limited to 'ext/zip')
-rw-r--r--ext/zip/tests/oo_getcomment.phpt12
1 files changed, 11 insertions, 1 deletions
diff --git a/ext/zip/tests/oo_getcomment.phpt b/ext/zip/tests/oo_getcomment.phpt
index 2bcbe29543..d05385c7df 100644
--- a/ext/zip/tests/oo_getcomment.phpt
+++ b/ext/zip/tests/oo_getcomment.phpt
@@ -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