Follow-up r88653: removed the remaining of OutputPage's stubbing
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 23 May 2011 17:53:31 +0000 (17:53 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 23 May 2011 17:53:31 +0000 (17:53 +0000)
tests/phpunit/includes/GlobalTest.php
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/suites/UploadFromUrlTestSuite.php

index 31929d7..fdcc82a 100644 (file)
@@ -523,8 +523,7 @@ class GlobalTest extends MediaWikiTestCase {
                $old_wgOut = $wgOut;
                $old_wgShowDebug = $wgShowDebug;
                
-               $wgOut = new StubObject( 'wgOut', 'MockOutputPage' );
-               $wgOut->doNothing(); //just to unstub it
+               $wgOut = new MockOutputPage;
                
                $wgShowDebug = true;
                
@@ -879,7 +878,5 @@ class MockOutputPage {
        function debug( $message ) {
                $this->message = "JAJA is a stupid error message. Anyway, here's your message: $message";
        }
-       
-       function doNothing() {}
 }
 
index 8a2c7d1..b67909e 100644 (file)
@@ -76,8 +76,9 @@ class NewParserTest extends MediaWikiTestCase {
 
                // $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;
 
index db8efce..9e6bf7f 100644 (file)
@@ -48,8 +48,9 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
 
                // $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;