]> granicus.if.org Git - php/commitdiff
test needed tweaking to pass now
authorGreg Beaver <cellog@php.net>
Sun, 1 Jan 2006 22:10:21 +0000 (22:10 +0000)
committerGreg Beaver <cellog@php.net>
Sun, 1 Jan 2006 22:10:21 +0000 (22:10 +0000)
ext/phar/tests/016.phpt

index 7a51bbe23f20f7ed715b034107d14aeb72eb8943..7ffe5b0e19cd60c159af2a21c2db33ca7a405846 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-PHP_Archive::mapPhar valid file (gzipped)
+PHP_Archive::mapPhar invalid file (gzipped file length is too short)
 --SKIPIF--
 <?php if (!extension_loaded("phar")) print "skip";
 if (!PHP_Archive::canCompress()) print "skip"; ?>
@@ -12,7 +12,7 @@ PHP_Archive::mapPhar('hio', true);
 __HALT_COMPILER(); ?>";
 // file length is too short
 $manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
-$file .= pack('VV', strlen($manifest) + 4, 1) . $manifest . pack('VV', crc32('a'), 1) . chr(75) . chr(4) . chr(0); // 'a' gzdeflated
+$file .= pack('VV', strlen($manifest) + 4, 1) . $manifest . pack('VV', crc32('a'), 1) . chr(0) . chr(4) . chr(0); // 'a' gzdeflated
 file_put_contents(dirname(__FILE__) . '/008_phar.php', $file);
 include dirname(__FILE__) . '/008_phar.php';
 echo file_get_contents('phar://hio/a');