Merge "Add tests for WikiMap and WikiReference"
[lhc/web/wiklou.git] / tests / parser / parserTest.inc
index 1cffa20..f429c30 100644 (file)
@@ -155,7 +155,7 @@ class ParserTest {
 
        static function setUp() {
                global $wgParser, $wgParserConf, $IP, $messageMemc, $wgMemc,
-                       $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
+                       $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory,
                        $wgExtraNamespaces, $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
                        $wgExtraInterlanguageLinkPrefixes, $wgLocalInterwikis,
                        $parserMemc, $wgThumbnailScriptPath, $wgScriptPath,
@@ -211,7 +211,6 @@ class ParserTest {
                        $wgParserCacheType = CACHE_NONE;
                }
 
-               $wgEnableParserCache = false;
                DeferredUpdates::clearPendingUpdates();
                $wgMemc = wfGetMainCache(); // checks $wgMainCacheType
                $messageMemc = wfGetMessageCacheStorage();
@@ -890,9 +889,9 @@ class ParserTest {
                        'wgDisableTitleConversion' => false,
                        // Tidy options.
                        'wgUseTidy' => isset( $opts['tidy'] ),
-                       'wgAlwaysUseTidy' => false,
+                       'wgTidyConfig' => null,
                        'wgDebugTidy' => false,
-                       'wgTidyConf' => $IP . '/includes/tidy.conf',
+                       'wgTidyConf' => $IP . '/includes/tidy/tidy.conf',
                        'wgTidyOpts' => '',
                        'wgTidyInternal' => $this->tidySupport->isInternal(),
                );
@@ -937,6 +936,7 @@ class ParserTest {
                $wgHooks['ParserGetVariableValueTs'][] = 'ParserTest::getFakeTimestamp';
 
                MagicWord::clearCache();
+               MWTidy::destroySingleton();
 
                return $context;
        }
@@ -1219,6 +1219,7 @@ class ParserTest {
                FileBackendGroup::destroySingleton();
                LockManagerGroup::destroySingletons();
                LinkCache::singleton()->clear();
+               MWTidy::destroySingleton();
 
                foreach ( $this->savedGlobals as $var => $val ) {
                        $GLOBALS[$var] = $val;