Merge "Fix sessionfailure i18n message during authentication"
[lhc/web/wiklou.git] / tests / phpunit / includes / TitleMethodsTest.php
index 8af3434..f4eb6bf 100644 (file)
@@ -29,7 +29,7 @@ class TitleMethodsTest extends MediaWikiLangTestCase {
                        ]
                );
 
-               MWNamespace::getCanonicalNamespaces( true ); # reset namespace cache
+               MWNamespace::clearCaches();
                $wgContLang->resetNamespaces(); # reset namespace cache
        }
 
@@ -38,7 +38,7 @@ class TitleMethodsTest extends MediaWikiLangTestCase {
 
                parent::tearDown();
 
-               MWNamespace::getCanonicalNamespaces( true ); # reset namespace cache
+               MWNamespace::clearCaches();
                $wgContLang->resetNamespaces(); # reset namespace cache
        }
 
@@ -305,6 +305,7 @@ class TitleMethodsTest extends MediaWikiLangTestCase {
                        [ 'Help:Main Page', 'Help talk:Main Page' ],
                        [ 'Help talk:Main Page', 'Help:Main Page' ],
                        [ 'Special:FooBar', null ],
+                       [ 'Media:File.jpg', null ],
                ];
        }
 
@@ -317,13 +318,16 @@ class TitleMethodsTest extends MediaWikiLangTestCase {
         */
        public function testGetOtherPage( $text, $expected ) {
                if ( $expected === null ) {
-                       $this->setExpectedException( 'MWException' );
+                       $this->setExpectedException( MWException::class );
                }
 
                $title = Title::newFromText( $text );
                $this->assertEquals( $expected, $title->getOtherPage()->getPrefixedText() );
        }
 
+       /**
+        * @covers Title::clearCaches
+        */
        public function testClearCaches() {
                $linkCache = LinkCache::singleton();