diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2013-11-19 21:26:50 +0100 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2013-11-19 21:26:50 +0100 |
commit | 703aeaef1a43b07dc5497dba72c98151466396cc (patch) | |
tree | 1e18a6b3fc3c28156c2e56f8a3d515b8dd6a9cf9 /_test/bootstrap.php | |
parent | 33c3b3817b00aa9384760813643fac0e33daaaff (diff) | |
parent | 14b3007921f7b66fc9e3621b861a3c83e7e9093c (diff) | |
download | rpg-703aeaef1a43b07dc5497dba72c98151466396cc.tar.gz rpg-703aeaef1a43b07dc5497dba72c98151466396cc.tar.bz2 |
Merge remote-tracking branch 'origin/master' into diff_navigation
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); |