mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
new test for valid callback that fails for rewrite callback
This commit is contained in:
parent
ce5732112e
commit
22878f0ea2
Binary file not shown.
BIN
ext/phar/tests/files/frontcontroller17.phar
Normal file
BIN
ext/phar/tests/files/frontcontroller17.phar
Normal file
Binary file not shown.
16
ext/phar/tests/files/frontcontroller17.phar.inc
Normal file
16
ext/phar/tests/files/frontcontroller17.phar.inc
Normal 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();');
|
||||
?>
|
14
ext/phar/tests/frontcontroller32.phpt
Normal file
14
ext/phar/tests/frontcontroller32.phpt
Normal 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
|
Loading…
Reference in New Issue
Block a user