mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
fix zip front controller tests for php6
This commit is contained in:
parent
39125fdd47
commit
571dfc1e49
@ -3,13 +3,13 @@
|
||||
$a = new Phar(dirname(__FILE__) . '/frontcontroller12.phar.zip');
|
||||
$a['index.php'] = '<?php
|
||||
var_dump($_SERVER["PHP_SELF"]);
|
||||
var_dump($_SERVER["SCRIPT_NAME"]);
|
||||
var_dump($_SERVER["SCRIPT_FILENAME"]);
|
||||
var_dump($_SERVER["REQUEST_URI"]);
|
||||
var_dump($_SERVER["PHAR_PHP_SELF"]);
|
||||
var_dump($_SERVER["PHAR_SCRIPT_NAME"]);
|
||||
var_dump($_SERVER["PHAR_SCRIPT_FILENAME"]);
|
||||
var_dump($_SERVER["PHAR_REQUEST_URI"]);
|
||||
var_dump($_SERVER[b"SCRIPT_NAME"]);
|
||||
var_dump($_SERVER[b"SCRIPT_FILENAME"]);
|
||||
var_dump($_SERVER[b"REQUEST_URI"]);
|
||||
var_dump($_SERVER[b"PHAR_PHP_SELF"]);
|
||||
var_dump($_SERVER[b"PHAR_SCRIPT_NAME"]);
|
||||
var_dump($_SERVER[b"PHAR_SCRIPT_FILENAME"]);
|
||||
var_dump($_SERVER[b"PHAR_REQUEST_URI"]);
|
||||
';
|
||||
$a->setStub('<?php
|
||||
Phar::mungServer(array("PHP_SELF", "SCRIPT_NAME", "SCRIPT_FILENAME", "REQUEST_URI"));
|
||||
|
Binary file not shown.
@ -7,7 +7,7 @@ $a['a.phps'] = '<?php function hio(){}';
|
||||
$a->setStub('<?php
|
||||
function s($a)
|
||||
{
|
||||
static $b = array("/hi" => "a.phps");
|
||||
static $b = array(b"/hi" => b"a.phps");
|
||||
if (isset($b[$a])) return $b[$a];
|
||||
return $a;
|
||||
}
|
||||
|
Binary file not shown.
@ -7,7 +7,7 @@ $a['a.phps'] = '<?php function hio(){}';
|
||||
$a->setStub('<?php
|
||||
function s($a)
|
||||
{
|
||||
static $b = array("/hi" => false);
|
||||
static $b = array(b"/hi" => false);
|
||||
if (isset($b[$a])) return $b[$a];
|
||||
return $a;
|
||||
}
|
||||
|
Binary file not shown.
@ -15,7 +15,7 @@ files/frontcontroller12.phar.zip
|
||||
--EXPECTHEADERS--
|
||||
Content-type: text/html; charset=UTF-8
|
||||
--EXPECTF--
|
||||
string(10) "/index.php"
|
||||
%unicode|string%(10) "/index.php"
|
||||
string(10) "/index.php"
|
||||
string(%d) "phar://%sfrontcontroller21.phar.php/index.php"
|
||||
string(18) "/index.php?test=hi"
|
||||
|
Loading…
Reference in New Issue
Block a user