diff options
Diffstat (limited to 'ext/phar/tests/012.phpt')
| -rw-r--r-- | ext/phar/tests/012.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/phar/tests/012.phpt b/ext/phar/tests/012.phpt new file mode 100644 index 0000000..3246eff --- /dev/null +++ b/ext/phar/tests/012.phpt @@ -0,0 +1,28 @@ +--TEST-- +Phar::mapPhar valid file +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip");?> +--INI-- +phar.require_hash=0 +--FILE-- +<?php + +$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$pname = 'phar://' . $fname; +$file = "<?php +Phar::mapPhar('hio'); +__HALT_COMPILER(); ?>"; + +$files = array(); +$files['a'] = 'a'; + +include 'files/phar_test.inc'; +include $fname; + +echo file_get_contents('phar://hio/a'); + +?> +--CLEAN-- +<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +--EXPECT-- +a |
