summaryrefslogtreecommitdiff
path: root/_test/bootstrap.php
diff options
context:
space:
mode:
authorGerrit Uitslag <klapinklapin@gmail.com>2013-11-19 21:26:50 +0100
committerGerrit Uitslag <klapinklapin@gmail.com>2013-11-19 21:26:50 +0100
commit703aeaef1a43b07dc5497dba72c98151466396cc (patch)
tree1e18a6b3fc3c28156c2e56f8a3d515b8dd6a9cf9 /_test/bootstrap.php
parent33c3b3817b00aa9384760813643fac0e33daaaff (diff)
parent14b3007921f7b66fc9e3621b861a3c83e7e9093c (diff)
downloadrpg-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.php10
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);