$old_wgOut = $wgOut;
$old_wgShowDebug = $wgShowDebug;
- $wgOut = new StubObject( 'wgOut', 'MockOutputPage' );
- $wgOut->doNothing(); //just to unstub it
+ $wgOut = new MockOutputPage;
$wgShowDebug = true;
function debug( $message ) {
$this->message = "JAJA is a stupid error message. Anyway, here's your message: $message";
}
-
- function doNothing() {}
}
// $tmpGlobals['wgContLang'] = new StubContLang;
$tmpGlobals['wgUser'] = new User;
- $tmpGlobals['wgLang'] = new StubUserLang;
- $tmpGlobals['wgOut'] = new StubObject( 'wgOut', 'OutputPage' );
+ $context = new RequestContext();
+ $tmpGlobals['wgLang'] = $context->lang;
+ $tmpGlobals['wgOut'] = $context->output;
$tmpGlobals['wgParser'] = new StubObject( 'wgParser', $GLOBALS['wgParserConf']['class'], array( $GLOBALS['wgParserConf'] ) );
$tmpGlobals['wgRequest'] = new WebRequest;
// $wgContLang = new StubContLang;
$wgUser = new User;
- $wgLang = new StubUserLang;
- $wgOut = new StubObject( 'wgOut', 'OutputPage' );
+ $context = new RequestContext;
+ $wgLang = $context->lang;
+ $wgOut = $context->output;
$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
$wgRequest = new WebRequest;