r90561 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90560‎ | r90561 | r90562 >
Date:00:01, 22 June 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
Provisional revert of r90538. I can't replicate the failures, but CI's been complaining since this commit
Modified paths:
  • /trunk/phase3/includes/templates/NoLocalSettings.php (modified) (history)
  • /trunk/phase3/tests/phpunit/MediaWikiTestCase.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/TitlePermissionTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/UploadTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/parser/MediaWikiParserTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php
@@ -231,9 +231,5 @@
232232 MediaWikiPHPUnitCommand::$additionalOptions[$offset] = $value;
233233
234234 }
235 -
236 - public static function disableInterwikis( $prefix, &$data ) {
237 - return false;
238 - }
239235 }
240236
Index: trunk/phase3/tests/phpunit/includes/UploadTest.php
@@ -7,18 +7,12 @@
88
99
1010 function setUp() {
11 - global $wgHooks;
 11+ global $wgContLang;
1212 parent::setUp();
13 -
 13+ $wgContLang = Language::factory( 'en' );
1414 $this->upload = new UploadTestHandler;
15 - $this->hooks = $wgHooks;
16 - $wgHooks['InterwikiLoadPrefix'][] = 'MediaWikiTestCase::disableInterwikis';
1715 }
1816
19 - function tearDown() {
20 - $wgHooks = $this->hooks;
21 - }
22 -
2317 /**
2418 * Test various forms of valid and invalid titles that can be supplied.
2519 */
Index: trunk/phase3/tests/phpunit/includes/TitlePermissionTest.php
@@ -3,7 +3,7 @@
44 /**
55 * @group Database
66 */
7 -class TitlePermissionTest extends MediaWikiLangTestCase {
 7+class TitlePermissionTest extends MediaWikiTestCase {
88 protected $title;
99 protected $user;
1010 protected $anonUser;
@@ -14,7 +14,6 @@
1515
1616 function setUp() {
1717 global $wgLocaltimezone, $wgLocalTZoffset, $wgMemc, $wgContLang, $wgLang;
18 - parent::setUp();
1918
2019 if(!$wgMemc) {
2120 $wgMemc = new EmptyBagOStuff;
@@ -51,10 +50,6 @@
5251 }
5352 }
5453
55 - function tearDown() {
56 - parent::tearDown();
57 - }
58 -
5954 function setUserPerm( $perm ) {
6055 if ( is_array( $perm ) ) {
6156 $this->user->mRights = $perm;
Property changes on: trunk/phase3/tests/phpunit/includes/parser/MediaWikiParserTest.php
___________________________________________________________________
Deleted: svn:mergeinfo
6257 Reverse-merged /branches/REL1_15/phase3/tests/phpunit/includes/parser/MediaWikiParserTest.php:r51646
6358 Reverse-merged /branches/REL1_17/phase3/tests/phpunit/includes/parser/MediaWikiParserTest.php:r81445,81448
6459 Reverse-merged /branches/sqlite/tests/phpunit/includes/parser/MediaWikiParserTest.php:r58211-58321
6560 Reverse-merged /branches/new-installer/phase3/tests/phpunit/includes/parser/MediaWikiParserTest.php:r43664-66004
Property changes on: trunk/phase3/includes/templates/NoLocalSettings.php
___________________________________________________________________
Deleted: svn:mergeinfo
6661 Reverse-merged /branches/REL1_15/phase3/includes/templates/NoLocalSettings.php:r51646
6762 Reverse-merged /branches/sqlite/includes/templates/NoLocalSettings.php:r58211-58321
6863 Reverse-merged /branches/new-installer/phase3/includes/templates/NoLocalSettings.php:r43664-66004
6964 Reverse-merged /branches/wmf-deployment/includes/templates/NoLocalSettings.php:r53381

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90538UploadTest::testTitleValidation accessed the database to fetch the interwikis....platonides17:41, 21 June 2011

Comments

#Comment by 😂 (talk | contribs)   00:06, 22 June 2011

This revert fixes the following cases that were broken:

  • testParserTest with data set #162: Inline interwiki link
  • testParserTest with data set #163: Inline interwiki link with empty title (bug 2372)
  • testParserTest with data set #164: Interwiki link encoding conversion (bug 1636)
  • testParserTest with data set #165: Interwiki link with fragment (bug 2130)
  • testParserTest with data set #166: Interlanguage link
  • testParserTest with data set #167: Double interlanguage link
  • testParserTest with data set #168: Interlanguage link, with prefix links
  • testParserTest with data set #169: Double interlanguage link, with prefix links (bug 8897)
#Comment by Platonides (talk | contribs)   21:02, 22 June 2011

Silly, silly me. I had been trying different things, wondering why $wgHooks still had InterwikiLoadPrefix hook magically set, and it was just a gglobal missing. Readded in r90603

Status & tagging log