php-src/ext/phar/tests/015b.phpt

24 lines
792 B
Plaintext
Raw Normal View History

2006-01-12 21:16:29 +00:00
--TEST--
Phar::mapPhar valid file (bzip2)
--SKIPIF--
2007-01-21 16:58:23 +00:00
<?php if (!extension_loaded("phar")) print "skip";?>
<?php if (!extension_loaded("bz2")) print "skip bz2 not present"; ?>
--INI--
phar.require_hash=0
2006-01-12 21:16:29 +00:00
--FILE--
<?php
2007-01-21 16:58:23 +00:00
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
$pname = 'phar://' . $fname;
$file = "<?php __HALT_COMPILER(); ?>";
2006-01-12 21:16:29 +00:00
$files = array();
2007-01-21 16:58:23 +00:00
$files['a'] = array('cont'=>'Hello World', 'comp'=>pack('H*', '425a6839314159265359d872012f00000157800010400000400080060490002000220686d420c988c769e8281f8bb9229c28486c39009780'),'flags'=>0x00002000);
include 'phar_test.inc';
2006-01-12 21:16:29 +00:00
2007-01-21 16:58:23 +00:00
var_dump(file_get_contents($pname . '/a'));
2006-01-12 21:16:29 +00:00
?>
--CLEAN--
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
--EXPECT--
string(11) "Hello World"