X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Ftitle%2FNamespaceAwareForeignTitleFactoryTest.php;h=76cedc60ea8775f34473e6f607e7523150224db6;hb=0bc81d74c0840e484709784d47f54d44cea1e30a;hp=9cb195cc380b070750511c7d352c881885e5ed0a;hpb=ba68d15a7594b4e9b4fa5235d81210843cbabca3;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/title/NamespaceAwareForeignTitleFactoryTest.php b/tests/phpunit/includes/title/NamespaceAwareForeignTitleFactoryTest.php index 9cb195cc38..76cedc60ea 100644 --- a/tests/phpunit/includes/title/NamespaceAwareForeignTitleFactoryTest.php +++ b/tests/phpunit/includes/title/NamespaceAwareForeignTitleFactoryTest.php @@ -27,36 +27,36 @@ class NamespaceAwareForeignTitleFactoryTest extends MediaWikiTestCase { public function basicProvider() { - return array( - array( + return [ + [ 'MainNamespaceArticle', 0, new ForeignTitle( 0, '', 'MainNamespaceArticle' ), - ), - array( + ], + [ 'MainNamespaceArticle', null, new ForeignTitle( 0, '', 'MainNamespaceArticle' ), - ), - array( + ], + [ 'Talk:Nice_talk', 1, new ForeignTitle( 1, 'Talk', 'Nice_talk' ), - ), - array( + ], + [ 'Bogus:Nice_talk', 0, new ForeignTitle( 0, '', 'Bogus:Nice_talk' ), - ), - array( + ], + [ 'Bogus:Nice_talk', null, new ForeignTitle( 9000, 'Bogus', 'Nice_talk' ), - ), - array( + ], + [ 'Bogus:Nice_talk', 4, new ForeignTitle( 4, 'Bogus', 'Nice_talk' ), - ), - array( + ], + [ 'Bogus:Nice_talk', 1, new ForeignTitle( 1, 'Talk', 'Nice_talk' ), - ), - ); + ], + ]; } /** @@ -64,9 +64,9 @@ class NamespaceAwareForeignTitleFactoryTest extends MediaWikiTestCase { */ public function testBasic( $title, $ns, ForeignTitle $foreignTitle ) { - $foreignNamespaces = array( + $foreignNamespaces = [ 0 => '', 1 => 'Talk', 100 => 'Portal', 9000 => 'Bogus' - ); + ]; $factory = new NamespaceAwareForeignTitleFactory( $foreignNamespaces ); $testTitle = $factory->createForeignTitle( $title, $ns );