diff options
author | valmat <ufabiz@gmail.com> | 2014-04-14 21:23:11 +0600 |
---|---|---|
committer | valmat <ufabiz@gmail.com> | 2014-04-14 21:23:11 +0600 |
commit | ea65bafff940dac23c52fc307b9a2e552b983102 (patch) | |
tree | 5a6c03c700125f06de81074774093620a4e9b2f1 /tests/php/phpt/variables/027-env.phpt | |
parent | 8aa33ba24d56e1a631826bac47321a47ad0bb9e2 (diff) |
Several tests on superglobals variables
Diffstat (limited to 'tests/php/phpt/variables/027-env.phpt')
-rw-r--r-- | tests/php/phpt/variables/027-env.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/php/phpt/variables/027-env.phpt b/tests/php/phpt/variables/027-env.phpt new file mode 100644 index 0000000..4e84cfe --- /dev/null +++ b/tests/php/phpt/variables/027-env.phpt @@ -0,0 +1,25 @@ +--TEST-- +test superglobal _ENV +--SKIPIF-- +<?php if (!extension_loaded("extension_for_tests")) print "skip"; ?> +--ENV-- +return <<<END +ENVVAR1=ENVVAL1 +HTTP_REFERER=http://spb.1gs.ru/ +HTTP_USER_AGENT=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0 +HTTP_COOKIE=usr=1cfa6e9905; pc=0; PHPSESSID=4d08j9phpe1c6; vmode=0 +HTTP_HOST=phpcpp.com +END; +--FILEEOF-- +<?php + + +TestVariables\test_env(); +//var_export($_SERVER); echo PHP_EOL, PHP_EOL, PHP_EOL; + +--EXPECTF-- +HTTP_USER_AGENT => Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0 +ENVVAR1 => ENVVAL1 +HTTP_REFERER => http://spb.1gs.ru/ +REQUEST_METHOD => GET +HTTP_HOST => phpcpp.com |