Files
php-rar/tests/033.phpt
cataphract 9d49ce4842 - Omitted volume not found warning if volume callback was specified.
. rar_broken_is omits no warnings (except the volume not found one, but see above)
- Tests for reading broken files
- Other tests for rararch.c

git-svn-id: http://svn.php.net/repository/pecl/rar/trunk@300083 c90b9560-bf6c-de11-be94-00142212c4b1
2010-06-02 03:20:10 +00:00

25 lines
608 B
PHP

--TEST--
rar_solid_is() basic test
--SKIPIF--
<?php if(!extension_loaded("rar")) print "skip"; ?>
--FILE--
<?php
$arch1 = RarArchive::open(dirname(__FILE__) . "/store_method.rar");
$arch2 = RarArchive::open(dirname(__FILE__) . "/solid.rar");
echo "$arch1: " . ($arch1->isSolid()?'yes':'no') ."\n";
echo "$arch2: " . (rar_solid_is($arch2)?'yes':'no') . "\n";
$arch2->close();
var_dump(rar_solid_is($arch2));
echo "\n";
echo "Done.\n";
--EXPECTF--
RAR Archive "%sstore_method.rar": no
RAR Archive "%ssolid.rar": yes
Warning: rar_solid_is(): The archive is already closed in %s on line %d
bool(false)
Done.