diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2013-10-19 18:24:57 +0100 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2013-10-19 18:24:57 +0100 |
commit | 4b94edc8e8badb6bcdc25b41f73310a8e323ba92 (patch) | |
tree | 135f4f9e4e4b37a18aad5ac23b618a023e4447bf /_test/bootstrap.php | |
parent | 698e7df8c9d5c43a93ed6822efa537158682a700 (diff) | |
parent | 9f5b9cf15569babaa90f0d6f3dd58cefd5439bc5 (diff) | |
download | rpg-4b94edc8e8badb6bcdc25b41f73310a8e323ba92.tar.gz rpg-4b94edc8e8badb6bcdc25b41f73310a8e323ba92.tar.bz2 |
Merge branch 'master' into FS#2867
Diffstat (limited to '_test/bootstrap.php')
-rw-r--r-- | _test/bootstrap.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/_test/bootstrap.php b/_test/bootstrap.php index 732fef9ed..3f59db515 100644 --- a/_test/bootstrap.php +++ b/_test/bootstrap.php @@ -68,6 +68,13 @@ $default_server_vars = array( 'REQUEST_TIME' => time(), ); +// fixup for $_SERVER when run from CLI, +// some values should be mocked for use by inc/init.php which is called here +// [ $_SERVER is also mocked in TestRequest::execute() ] +if (php_sapi_name() == 'cli') { + $_SERVER = array_merge($default_server_vars, $_SERVER); +} + // create temp directories mkdir(TMP_DIR); |