diff options
author | Greg Beaver <cellog@php.net> | 2007-12-22 07:47:15 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2007-12-22 07:47:15 +0000 |
commit | d443c76bed0eb217bce7100c70e777b7bccc71dc (patch) | |
tree | 942fc39dc4f97ff147f1eaafa050a68c330072e7 /ext | |
parent | 8e4cc4b3dd81b184da2229782cd65547a674956f (diff) | |
download | php-git-d443c76bed0eb217bce7100c70e777b7bccc71dc.tar.gz |
new test for front controller
Diffstat (limited to 'ext')
-rw-r--r-- | ext/phar/tests/frontcontroller1.phpt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ext/phar/tests/frontcontroller1.phpt b/ext/phar/tests/frontcontroller1.phpt new file mode 100644 index 0000000000..c6934679ba --- /dev/null +++ b/ext/phar/tests/frontcontroller1.phpt @@ -0,0 +1,39 @@ +--TEST-- +Phar front controller +--SKIPIF-- +<?php if (!extension_loaded("phar")) print "skip"; ?> +--INI-- +phar.require_hash=0 +phar.readonly=0 +--FILE-- +<?php +$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$pname = 'phar://' . $fname; +$file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; + +$files = array(); +$gflags = 0x020000; +$files['a.jpg'] = 'hio'; + +include 'phar_test.inc'; + +$a = new Phar($fname); +$a->setStub('<?php +Phar::mapPhar(); +include "phar://" . __FILE__ . "/a.jpg"; +__HALT_COMPILER();'); + +include $fname; +?> +===DONE=== +--CLEAN-- +<?php +unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); +__HALT_COMPILER(); +?> +--EXPECTHEADERS-- +Content-type: image/jpeg +Content-length: 3 +--EXPECT-- +hio===DONE=== |