r88659 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88658‎ | r88659 | r88660 >
Date:17:53, 23 May 2011
Author:ialex
Status:ok
Tags:
Comment:
Follow-up r88653: removed the remaining of OutputPage's stubbing
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/GlobalTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/suites/UploadFromUrlTestSuite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/GlobalTest.php
@@ -523,8 +523,7 @@
524524 $old_wgOut = $wgOut;
525525 $old_wgShowDebug = $wgShowDebug;
526526
527 - $wgOut = new StubObject( 'wgOut', 'MockOutputPage' );
528 - $wgOut->doNothing(); //just to unstub it
 527+ $wgOut = new MockOutputPage;
529528
530529 $wgShowDebug = true;
531530
@@ -879,7 +878,5 @@
880879 function debug( $message ) {
881880 $this->message = "JAJA is a stupid error message. Anyway, here's your message: $message";
882881 }
883 -
884 - function doNothing() {}
885882 }
886883
Index: trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php
@@ -76,8 +76,9 @@
7777
7878 // $tmpGlobals['wgContLang'] = new StubContLang;
7979 $tmpGlobals['wgUser'] = new User;
80 - $tmpGlobals['wgLang'] = new StubUserLang;
81 - $tmpGlobals['wgOut'] = new StubObject( 'wgOut', 'OutputPage' );
 80+ $context = new RequestContext();
 81+ $tmpGlobals['wgLang'] = $context->lang;
 82+ $tmpGlobals['wgOut'] = $context->output;
8283 $tmpGlobals['wgParser'] = new StubObject( 'wgParser', $GLOBALS['wgParserConf']['class'], array( $GLOBALS['wgParserConf'] ) );
8384 $tmpGlobals['wgRequest'] = new WebRequest;
8485
Index: trunk/phase3/tests/phpunit/suites/UploadFromUrlTestSuite.php
@@ -48,8 +48,9 @@
4949
5050 // $wgContLang = new StubContLang;
5151 $wgUser = new User;
52 - $wgLang = new StubUserLang;
53 - $wgOut = new StubObject( 'wgOut', 'OutputPage' );
 52+ $context = new RequestContext;
 53+ $wgLang = $context->lang;
 54+ $wgOut = $context->output;
5455 $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
5556 $wgRequest = new WebRequest;
5657

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88653Per comment on r87680: make parser tests work again....ialex17:22, 23 May 2011

Status & tagging log