Save and restore $wgHooks in NewParserTest.
authorPlatonides <platonides@users.mediawiki.org>
Sun, 20 Feb 2011 00:13:26 +0000 (00:13 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 20 Feb 2011 00:13:26 +0000 (00:13 +0000)
ParserGetVariableValueTs hook still being set to ParserTest::getFakeTimestamp was the reason for the crazy failures of MagicVariableTest inside phpunit that I was seeing.

tests/phpunit/includes/parser/NewParserTest.php

index d957509..b69cd77 100644 (file)
@@ -56,6 +56,7 @@ class NewParserTest extends MediaWikiTestCase {
                );
                
                $tmpGlobals['wgEnableParserCache'] = false;
+               $tmpGlobals['wgHooks'] = array();
                $tmpGlobals['wgDeferredUpdateList'] = array();
                $tmpGlobals['wgMemc'] = &wfGetMainCache();
                $tmpGlobals['messageMemc'] = &wfGetMessageCacheStorage();