r72037 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72036‎ | r72037 | r72038 >
Date:17:58, 31 August 2010
Author:simetrical
Status:ok
Tags:
Comment:
Fix three test failures if project contains space

It was expecting "Test_Wiki" instead of "Test Wiki". These Language
methods are very poorly named, they should use Text vs. Dbkey (like
Title) instead of FormattedText vs. Text.
Modified paths:
  • /trunk/phase3/maintenance/tests/TitlePermissionTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/TitlePermissionTest.php
@@ -76,7 +76,7 @@
7777
7878 function testQuickPermissions() {
7979 global $wgContLang;
80 - $prefix = $wgContLang->getNsText( NS_PROJECT );
 80+ $prefix = $wgContLang->getFormattedNsText( NS_PROJECT );
8181
8282 $this->setUser( 'anon' );
8383 $this->setTitle( NS_TALK );
@@ -330,7 +330,7 @@
331331 $this->setUser( self::$userName );
332332 global $wgUser, $wgContLang;
333333 $wgUser = self::$user;
334 - $prefix = $wgContLang->getNsText( NS_PROJECT );
 334+ $prefix = $wgContLang->getFormattedNsText( NS_PROJECT );
335335
336336 $this->setTitle( NS_SPECIAL );
337337
@@ -436,7 +436,7 @@
437437 function testPageRestrictions() {
438438 global $wgUser, $wgContLang;
439439
440 - $prefix = $wgContLang->getNsText( NS_PROJECT );
 440+ $prefix = $wgContLang->getFormattedNsText( NS_PROJECT );
441441
442442 $wgUser = self::$user;
443443 $this->setTitle( NS_MAIN );

Status & tagging log