http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88659

Revision: 88659
Author:   ialex
Date:     2011-05-23 17:53:31 +0000 (Mon, 23 May 2011)
Log Message:
-----------
Follow-up r88653: removed the remaining of OutputPage's stubbing

Modified Paths:
--------------
    trunk/phase3/tests/phpunit/includes/GlobalTest.php
    trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php
    trunk/phase3/tests/phpunit/suites/UploadFromUrlTestSuite.php

Modified: trunk/phase3/tests/phpunit/includes/GlobalTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/GlobalTest.php  2011-05-23 17:52:37 UTC 
(rev 88658)
+++ trunk/phase3/tests/phpunit/includes/GlobalTest.php  2011-05-23 17:53:31 UTC 
(rev 88659)
@@ -523,8 +523,7 @@
                $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 @@
        function debug( $message ) {
                $this->message = "JAJA is a stupid error message. Anyway, 
here's your message: $message";
        }
-       
-       function doNothing() {}
 }
 

Modified: trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php        
2011-05-23 17:52:37 UTC (rev 88658)
+++ trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php        
2011-05-23 17:53:31 UTC (rev 88659)
@@ -76,8 +76,9 @@
 
                // $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;
 

Modified: trunk/phase3/tests/phpunit/suites/UploadFromUrlTestSuite.php
===================================================================
--- trunk/phase3/tests/phpunit/suites/UploadFromUrlTestSuite.php        
2011-05-23 17:52:37 UTC (rev 88658)
+++ trunk/phase3/tests/phpunit/suites/UploadFromUrlTestSuite.php        
2011-05-23 17:53:31 UTC (rev 88659)
@@ -48,8 +48,9 @@
 
                // $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;
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to