mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
increase code coverage to test cwd stuffs
This commit is contained in:
parent
b3e6072a04
commit
9d27fab9c4
3 changed files with 41 additions and 0 deletions
Binary file not shown.
25
ext/phar/tests/files/frontcontroller19.phar.inc
Normal file
25
ext/phar/tests/files/frontcontroller19.phar.inc
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
@unlink(dirname(__FILE__) . '/frontcontroller18.phar');
|
||||
$a = new Phar(dirname(__FILE__) . '/frontcontroller18.phar');
|
||||
$a['start/index.php'] = '<?php
|
||||
echo "start/index.php\n";
|
||||
include "./another.php";
|
||||
';
|
||||
$a['start/another.php'] = '<?php
|
||||
echo "start/another.php\n";
|
||||
include "another.php";
|
||||
?>';
|
||||
$a['another.php'] = '<?php
|
||||
echo "another.php\n";
|
||||
?>';
|
||||
$a->setStub('<?php
|
||||
set_include_path("phar://" . __FILE__);
|
||||
try {
|
||||
Phar::webPhar("test.phar", "/start/index.php");
|
||||
} catch (Exception $e) {
|
||||
die($e->getMessage() . "\n");
|
||||
}
|
||||
echo "oops did not run\n";
|
||||
var_dump($_ENV, $_SERVER);
|
||||
__HALT_COMPILER();');
|
||||
?>
|
16
ext/phar/tests/frontcontroller34.phpt
Normal file
16
ext/phar/tests/frontcontroller34.phpt
Normal file
|
@ -0,0 +1,16 @@
|
|||
--TEST--
|
||||
Phar front controller with cwd
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--ENV--
|
||||
SCRIPT_NAME=/frontcontroller34.php
|
||||
REQUEST_URI=/frontcontroller34.php/start/index.php
|
||||
PATH_INFO=/start/index.php
|
||||
--EXPECTHEADERS--
|
||||
Content-type: text/html
|
||||
--FILE_EXTERNAL--
|
||||
files/frontcontroller19.phar
|
||||
--EXPECT--
|
||||
start/index.php
|
||||
start/another.php
|
||||
another.php
|
Loading…
Add table
Add a link
Reference in a new issue