increase code coverage to test cwd stuffs

This commit is contained in:
Greg Beaver 2008-04-30 20:14:15 +00:00
parent b3e6072a04
commit 9d27fab9c4
3 changed files with 41 additions and 0 deletions

View 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();');
?>

View 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