X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fapi%2FApiQueryWatchlistIntegrationTest.php;h=26fedba1b35a7e9b8066fbe4efe69d330596094f;hp=41ecd529442f285d6027858f56b88860dfffe335;hb=9e8439e79d67788916d488f645108f79016d9aca;hpb=0770f85a0a293e6c7af6f1d3d3a1dbd2d13c1e09 diff --git a/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php b/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php index 41ecd52944..26fedba1b3 100644 --- a/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php +++ b/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php @@ -228,16 +228,8 @@ class ApiQueryWatchlistIntegrationTest extends ApiTestCase { } } - private function getTitleFormatter() { - return new MediaWikiTitleCodec( - Language::factory( 'en' ), - MediaWikiServices::getInstance()->getGenderCache() - ); - } - private function getPrefixedText( LinkTarget $target ) { - $formatter = $this->getTitleFormatter(); - return $formatter->getPrefixedText( $target ); + return MediaWikiServices::getInstance()->getTitleFormatter()->getPrefixedText( $target ); } private function cleanTestUsersWatchlist() { @@ -1583,7 +1575,7 @@ class ApiQueryWatchlistIntegrationTest extends ApiTestCase { $pages = array_values( $result[0]['query']['pages'] ); $this->assertCount( 1, $pages ); - $this->assertEquals( 0, $pages[0]['ns'] ); + $this->assertSame( 0, $pages[0]['ns'] ); $this->assertEquals( $this->getPrefixedText( $target ), $pages[0]['title'] ); $this->assertArraySubsetsEqual( $pages[0]['revisions'],