xref: /PHP-5.3/ext/phar/tests/015b.phpt (revision 610c7fbe)
1--TEST--
2Phar::mapPhar valid file (bzip2)
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip");?>
5<?php if (!extension_loaded("bz2")) die("skip bz2 not present"); ?>
6--INI--
7phar.require_hash=0
8--FILE--
9<?php
10$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
11$pname = 'phar://' . $fname;
12$file = "<?php __HALT_COMPILER(); ?>";
13
14$files = array();
15$files['a'] = array('cont'=>'Hello World', 'comp'=>pack('H*', '425a6834314159265359065c89da0000009780400000400080060490002000310c082031a916c41d41e2ee48a70a1200cb913b40'),'flags'=>0x00002000);
16include 'files/phar_test.inc';
17
18var_dump(file_get_contents($pname . '/a'));
19?>
20--CLEAN--
21<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
22--EXPECT--
23string(11) "Hello World"
24