xref: /PHP-5.3/ext/phar/tests/012.phpt (revision 228c2886)
1--TEST--
2Phar::mapPhar valid file
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip");?>
5--INI--
6phar.require_hash=0
7detect_unicode=0
8--FILE--
9<?php
10
11$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
12$pname = 'phar://' . $fname;
13$file = "<?php
14Phar::mapPhar('hio');
15__HALT_COMPILER(); ?>";
16
17$files = array();
18$files['a'] = 'a';
19
20include 'files/phar_test.inc';
21include $fname;
22
23echo file_get_contents('phar://hio/a');
24
25?>
26--CLEAN--
27<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
28--EXPECT--
29a
30