$GLOBALS['wgContLang'] = $context->lang;
is not assigning $wgContLang the same $langObj instantiated a couple of lines above, but a different object obtained from the user code, breaking variant parsertestsw..
$langObj = Language::factory( $lang );
$GLOBALS['wgContLang'] = $langObj;
-
$context = new RequestContext();
- $GLOBALS['wgLang'] = $context->lang;
- $GLOBALS['wgContLang'] = $context->lang;
+ $GLOBALS['wgLang'] = $context->getLang();
+
$GLOBALS['wgMemc'] = new EmptyBagOStuff;
$GLOBALS['wgOut'] = new $context->output;
$langObj = Language::factory( $lang );
$GLOBALS['wgContLang'] = $langObj;
-
$context = new RequestContext();
$GLOBALS['wgLang'] = $context->lang;
- $GLOBALS['wgContLang'] = $context->lang;
+
$GLOBALS['wgMemc'] = new EmptyBagOStuff;
$GLOBALS['wgOut'] = new $context->output;