xref: /PHP-7.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
7--FILE--
8<?php
9
10$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
11$pname = 'phar://' . $fname;
12$file = "<?php
13Phar::mapPhar('hio');
14__HALT_COMPILER(); ?>";
15
16$files = array();
17$files['a'] = 'a';
18
19include 'files/phar_test.inc';
20include $fname;
21
22echo file_get_contents('phar://hio/a');
23
24?>
25--CLEAN--
26<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
27--EXPECT--
28a
29