diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2014-03-12 18:39:11 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2014-03-12 18:39:11 +0000 |
commit | 4e60057c8ccbee18b94a64208311f9bbb338eec6 (patch) | |
tree | 08d79159aa78693c27f54ecebc3105034dfc5933 /_test/bootstrap.php | |
parent | 57a6f99d09d3662a8a2ad72e312aa6f53bcc2d01 (diff) | |
parent | 069942acdaa5ba825bc3f92c7093b5071789f1ca (diff) | |
download | rpg-4e60057c8ccbee18b94a64208311f9bbb338eec6.tar.gz rpg-4e60057c8ccbee18b94a64208311f9bbb338eec6.tar.bz2 |
Merge branch 'master' into tablethead
Diffstat (limited to '_test/bootstrap.php')
-rw-r--r-- | _test/bootstrap.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/_test/bootstrap.php b/_test/bootstrap.php index 732fef9ed..4f0d5efaa 100644 --- a/_test/bootstrap.php +++ b/_test/bootstrap.php @@ -15,7 +15,8 @@ require_once DOKU_UNITTEST.'core/TestUtils.php'; define('SIMPLE_TEST', true); // basic behaviours -error_reporting(E_ALL); +define('DOKU_E_LEVEL',E_ALL ^ E_NOTICE); +error_reporting(DOKU_E_LEVEL); set_time_limit(0); ini_set('memory_limit','2048M'); @@ -68,6 +69,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); |