Home > Archive > PHP PEAR Questions and Answers > January 2008 > [PEAR-QA] phpt test with $_SERVER
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
[PEAR-QA] phpt test with $_SERVER
|
|
| Philippe Jausions 2008-01-26, 7:09 pm |
| Hi QA team,
I'm trying to put together some tests for HTTP package: How does one set
$_SERVER for a a phpt file? I know of --POST-- and --GET-- section, but
that's all...
Thanks,
-Philippe
| |
| Gregory Beaver 2008-01-28, 7:14 pm |
| Philippe Jausions wrote:
> Hi QA team,
>
> I'm trying to put together some tests for HTTP package: How does one set
> $_SERVER for a a phpt file? I know of --POST-- and --GET-- section, but
> that's all...
$_SERVER is populated from environment variables in phpt, as it uses the
cgi SAPI. If you want to populate SCRIPT_NAME, use this section, for
example:
--ENV--
SCRIPT_NAME=blahblahblah
For samples, take a look at
http://cvs.php.net/viewvc.cgi/pecl/...hpt?view=markup
to see a test that simulates a web request for
"http://localhost/frontcontroller1.phar.php/a.jpg"
Greg
|
|
|
|
|