pajoye          Wed Nov 15 23:53:46 2006 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/zip/tests      oo_getcomment.phpt 
  Log:
  - mv oo_get_comment.phpt oo_getcomment.phpt
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/oo_getcomment.phpt?view=markup&rev=1.1
Index: php-src/ext/zip/tests/oo_getcomment.phpt
+++ php-src/ext/zip/tests/oo_getcomment.phpt
--TEST--
getComment
--SKIPIF--
<?php
/* $Id: oo_getcomment.phpt,v 1.1 2006/10/30 17:43:21 pajoye Exp $ */
if(!extension_loaded('zip')) die('skip');
?>
--FILE--
<?php
$dirname = dirname(__FILE__) . '/';
$file = $dirname . 'test_with_comment.zip';
include $dirname . 'utils.inc';
$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

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to