mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
new test for front controller
This commit is contained in:
parent
8e4cc4b3dd
commit
d443c76bed
1 changed files with 39 additions and 0 deletions
39
ext/phar/tests/frontcontroller1.phpt
Normal file
39
ext/phar/tests/frontcontroller1.phpt
Normal file
|
@ -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===
|
Loading…
Add table
Add a link
Reference in a new issue