Index: trunk/phase3/tests/parser/parserTest.inc |
— | — | @@ -166,8 +166,9 @@ |
167 | 167 | |
168 | 168 | // $wgContLang = new StubContLang; |
169 | 169 | $wgUser = new User; |
170 | | - $wgLang = new StubUserLang; |
171 | | - $wgOut = new StubObject( 'wgOut', 'OutputPage' ); |
| 170 | + $context = new RequestContext; |
| 171 | + $wgLang = $context->getLang(); |
| 172 | + $wgOut = $context->getOutput(); |
172 | 173 | $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) ); |
173 | 174 | $wgRequest = new WebRequest; |
174 | 175 | |
— | — | @@ -678,13 +679,14 @@ |
679 | 680 | $GLOBALS[$var] = $val; |
680 | 681 | } |
681 | 682 | |
682 | | - $langObj = Language::factory( $lang ); |
683 | | - $GLOBALS['wgContLang'] = $langObj; |
| 683 | + $GLOBALS['wgContLang'] = Language::factory( $lang ); |
| 684 | + $GLOBALS['wgMemc'] = new EmptyBagOStuff; |
| 685 | + |
684 | 686 | $context = new RequestContext(); |
685 | 687 | $GLOBALS['wgLang'] = $context->getLang(); |
| 688 | + $GLOBALS['wgOut'] = $context->getOutput(); |
686 | 689 | |
687 | | - $GLOBALS['wgMemc'] = new EmptyBagOStuff; |
688 | | - $GLOBALS['wgOut'] = new $context->output; |
| 690 | + $GLOBALS['wgUser'] = new User(); |
689 | 691 | |
690 | 692 | global $wgHooks; |
691 | 693 | |
— | — | @@ -693,9 +695,6 @@ |
694 | 696 | $wgHooks['ParserGetVariableValueTs'][] = 'ParserTest::getFakeTimestamp'; |
695 | 697 | |
696 | 698 | MagicWord::clearCache(); |
697 | | - |
698 | | - global $wgUser; |
699 | | - $wgUser = new User(); |
700 | 699 | } |
701 | 700 | |
702 | 701 | /** |