Fix three test failures if project contains space
authorAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 31 Aug 2010 17:58:50 +0000 (17:58 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 31 Aug 2010 17:58:50 +0000 (17:58 +0000)
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.

maintenance/tests/TitlePermissionTest.php

index f451974..34c8735 100644 (file)
@@ -76,7 +76,7 @@ class TitlePermissionTest extends PhpUnit_Framework_TestCase {
 
        function testQuickPermissions() {
                global $wgContLang;
-               $prefix = $wgContLang->getNsText( NS_PROJECT );
+               $prefix = $wgContLang->getFormattedNsText( NS_PROJECT );
 
                $this->setUser( 'anon' );
                $this->setTitle( NS_TALK );
@@ -330,7 +330,7 @@ class TitlePermissionTest extends PhpUnit_Framework_TestCase {
                $this->setUser( self::$userName );
                global $wgUser, $wgContLang;
                $wgUser = self::$user;
-               $prefix = $wgContLang->getNsText( NS_PROJECT );
+               $prefix = $wgContLang->getFormattedNsText( NS_PROJECT );
 
                $this->setTitle( NS_SPECIAL );
 
@@ -436,7 +436,7 @@ class TitlePermissionTest extends PhpUnit_Framework_TestCase {
        function testPageRestrictions() {
                global $wgUser, $wgContLang;
 
-               $prefix = $wgContLang->getNsText( NS_PROJECT );
+               $prefix = $wgContLang->getFormattedNsText( NS_PROJECT );
 
                $wgUser = self::$user;
                $this->setTitle( NS_MAIN );