summaryrefslogtreecommitdiff
path: root/ext/phar/tests/011.phpt
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2007-01-21 16:58:23 +0000
committerMarcus Boerger <helly@php.net>2007-01-21 16:58:23 +0000
commitfc80ed5913a85268418d17d5acb77fcac2f4a9ec (patch)
tree3c666e3a9ae9ebe7e8e78a61864dd9492e7833f2 /ext/phar/tests/011.phpt
parenta02afe32c10dea0cf4c48a2171730cba6cf971d0 (diff)
downloadphp-git-fc80ed5913a85268418d17d5acb77fcac2f4a9ec.tar.gz
- Update tests
Diffstat (limited to 'ext/phar/tests/011.phpt')
-rw-r--r--ext/phar/tests/011.phpt20
1 files changed, 5 insertions, 15 deletions
diff --git a/ext/phar/tests/011.phpt b/ext/phar/tests/011.phpt
index 009d51d4e7..3b0cde1d19 100644
--- a/ext/phar/tests/011.phpt
+++ b/ext/phar/tests/011.phpt
@@ -6,6 +6,8 @@ Phar::mapPhar filesize too small in manifest
phar.require_hash=0
--FILE--
<?php
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$pname = 'phar://' . $fname;
$file = "<?php
Phar::mapPhar('hio');
__HALT_COMPILER(); ?>";
@@ -13,22 +15,10 @@ __HALT_COMPILER(); ?>";
// compressed file length does not match incompressed lentgh for an uncompressed file
$files = array();
-$files['a'] = 'a';
-$manifest = '';
-foreach($files as $name => $cont) {
- $len = strlen($cont);
- $manifest .= pack('V', strlen($name)) . $name . pack('VVVVVV', $len, time(), $len+1, crc32($cont), 0x00000000, 0);
-}
-$alias = 'hio';
-$manifest = pack('VnVV', count($files), 0x0900, 0x00000000, strlen($alias)) . $alias . $manifest;
-$file .= pack('V', strlen($manifest)) . $manifest;
-foreach($files as $cont)
-{
- $file .= $cont;
-}
+$files['a'] = array('cont'=>'a','ulen'=>1,'clen'=>2);;
+include 'phar_test.inc';
-file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file);
-include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+include $fname;
echo file_get_contents('phar://hio/a');
?>
--CLEAN--