X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FTitleMethodsTest.php;h=f4eb6bf5d30158c930ac6dc570741dd2106b7e74;hp=d9c01cb9f132658fbb540ba99d5d4334486a590f;hb=faf7cc4a09848c538320bd2b9067b1a77c0a0183;hpb=f0bef2cf6994c49031d89425b3b3c56fd0e89a65 diff --git a/tests/phpunit/includes/TitleMethodsTest.php b/tests/phpunit/includes/TitleMethodsTest.php index d9c01cb9f1..f4eb6bf5d3 100644 --- a/tests/phpunit/includes/TitleMethodsTest.php +++ b/tests/phpunit/includes/TitleMethodsTest.php @@ -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 } @@ -318,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();