From: Brion Vibber Date: Tue, 6 Jun 2006 22:08:33 +0000 (+0000) Subject: Fix the converter tests; the language object doesn't seem to set up the converter... X-Git-Tag: 1.31.0-rc.0~56862 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=82777a234e67d30da3bf2059a313a1155a7b3486;p=lhc%2Fweb%2Fwiklou.git Fix the converter tests; the language object doesn't seem to set up the converter properly otherwise --- diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 167956eb45..b56a3d77ae 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -320,8 +320,6 @@ class ParserTest { } else { $lang = 'en'; } - $langClass = 'Language' . str_replace( '-', '_', ucfirst( $lang ) ); - $langObj = setupLangObj( $langClass ); $settings = array( 'wgServer' => 'http://localhost', @@ -339,8 +337,8 @@ class ParserTest { 'wgDBprefix' => 'parsertest_', 'wgDefaultUserOptions' => array(), - 'wgLang' => $langObj, - 'wgContLang' => $langObj, + 'wgLang' => null, + 'wgContLang' => null, 'wgNamespacesWithSubpages' => array( 0 => preg_match('/\\bsubpage\\b/i', $opts)), 'wgMaxTocLevel' => 999, 'wgCapitalLinks' => true, @@ -355,6 +353,11 @@ class ParserTest { $this->savedGlobals[$var] = $GLOBALS[$var]; $GLOBALS[$var] = $val; } + $langClass = 'Language' . str_replace( '-', '_', ucfirst( $lang ) ); + $langObj = setupLangObj( $langClass ); + $GLOBALS['wgLang'] = $langObj; + $GLOBALS['wgContLang'] = $langObj; + $GLOBALS['wgLoadBalancer']->loadMasterPos(); $GLOBALS['wgMessageCache']->initialise( new BagOStuff(), false, 0, $GLOBALS['wgDBname'] ); $this->setupDatabase();