mirror of
https://github.com/php/php-src.git
synced 2026-03-26 09:12:14 +01:00
increase code coverage to test cwd stuffs
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user