xref: /PHP-5.4/ext/phar/tests/015.phpt (revision 16b4d8e0)
1--TEST--
2Phar::mapPhar valid file (gzipped)
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5<?php if (!extension_loaded("zlib")) die("skip zlib 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'=>'a','comp'=>chr(75) . chr(4) . chr(0) /* 'a' gzdeflated */, 'flags'=>0x00001000);
16include 'files/phar_test.inc';
17
18echo file_get_contents($pname .'/a');
19?>
20--CLEAN--
21<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
22--EXPECT--
23a
24