summaryrefslogtreecommitdiff
path: root/_test/bootstrap.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2012-10-02 00:23:22 +0200
committerMichael Hamann <michael@content-space.de>2012-10-02 00:30:01 +0200
commit0c313f7823f6b43dd546221b81e0e22613a04d23 (patch)
tree0a5cd53c30cd50a7414b1c7eef20e83a527326ce /_test/bootstrap.php
parent1c6c1c6c7a64f010e0f9919ab40f018383fea205 (diff)
downloadrpg-0c313f7823f6b43dd546221b81e0e22613a04d23.tar.gz
rpg-0c313f7823f6b43dd546221b81e0e22613a04d23.tar.bz2
Always load the parser in the test environment
This fixes the problem that $PARSER_MODES was sometimes unset by PHPUnit between test functions that called p_get_parsermodes() as PHPUnit tried to restore the global environment. I couldn't reproduce this when I executed all tests but just when I executed a single plugin test.
Diffstat (limited to '_test/bootstrap.php')
-rw-r--r--_test/bootstrap.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/_test/bootstrap.php b/_test/bootstrap.php
index 58ad6a0d7..310b3627a 100644
--- a/_test/bootstrap.php
+++ b/_test/bootstrap.php
@@ -110,3 +110,7 @@ $dh->close();
// load dw
require_once(DOKU_INC.'inc/init.php');
+// load the parser so $PARSER_MODES is defined before the tests start
+// otherwise PHPUnit unsets $PARSER_MODES in some cases which breaks p_get_parsermodes()
+require_once(DOKU_INC.'inc/parser/parser.php');
+