xref: /PHP-8.2/ext/phar/tests/012.phpt (revision 74859783)
1--TEST--
2Phar::mapPhar valid file
3--EXTENSIONS--
4phar
5--INI--
6phar.require_hash=0
7--FILE--
8<?php
9
10$fname = __DIR__ . '/' . 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(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
27--EXPECT--
28a
29