new test for valid callback that fails for rewrite callback

This commit is contained in:
Greg Beaver 2008-04-23 16:50:19 +00:00
parent ce5732112e
commit 22878f0ea2
4 changed files with 30 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,16 @@
<?php
@unlink(dirname(__FILE__) . '/frontcontroller17.phar');
$a = new Phar(dirname(__FILE__) . '/frontcontroller17.phar');
$a['index.php'] = '<?php
echo "hi";
';
$a->setStub('<?php
try {
Phar::webPhar("test.phar", "/index.php", null, array(), "sort");
} catch (Exception $e) {
die($e->getMessage() . "\n");
}
echo "oops did not run\n";
var_dump($_ENV, $_SERVER);
__HALT_COMPILER();');
?>

View File

@ -0,0 +1,14 @@
--TEST--
Phar front controller with valid callback that is not good
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
SCRIPT_NAME=/frontcontroller32.php
REQUEST_URI=/frontcontroller32.php
--EXPECTHEADERS--
Content-type: text/html
--FILE_EXTERNAL--
files/frontcontroller17.phar
--EXPECTF--
Warning: Parameter 1 to sort() expected to be a reference, value given in %sfrontcontroller32.php on line 3
phar error: failed to call rewrite callback