X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FSampleTest.php;h=7c313845f9608c8e0c4068fc1539758e981dc6d2;hb=e5999cc51d196a8b8f3ad403fdf1187197e8282d;hp=c5944d16f4237e17814711df6d949b7c5e1d8efa;hpb=fbcb3d5f980a9be0611424764d6f18e749e4c1c9;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/SampleTest.php b/tests/phpunit/includes/SampleTest.php index c5944d16f4..7c313845f9 100644 --- a/tests/phpunit/includes/SampleTest.php +++ b/tests/phpunit/includes/SampleTest.php @@ -13,11 +13,11 @@ class TestSample extends MediaWikiLangTestCase { // This sets the globals and will restore them automatically // after each test. - $this->setMwGlobals( array( + $this->setMwGlobals( [ 'wgContLang' => Language::factory( 'en' ), 'wgLanguageCode' => 'en', 'wgCapitalLinks' => true, - ) ); + ] ); } /** @@ -48,21 +48,21 @@ class TestSample extends MediaWikiLangTestCase { * see: http://www.phpunit.de/manual/3.4/en/writing-tests-for-phpunit.html */ public static function provideTitles() { - return array( - array( 'Text', NS_MEDIA, 'Media:Text' ), - array( 'Text', null, 'Text' ), - array( 'text', null, 'Text' ), - array( 'Text', NS_USER, 'User:Text' ), - array( 'Photo.jpg', NS_FILE, 'File:Photo.jpg' ) - ); + return [ + [ 'Text', NS_MEDIA, 'Media:Text' ], + [ 'Text', null, 'Text' ], + [ 'text', null, 'Text' ], + [ 'Text', NS_USER, 'User:Text' ], + [ 'Photo.jpg', NS_FILE, 'File:Photo.jpg' ] + ]; } + // @codingStandardsIgnoreStart Generic.Files.LineLength /** * @dataProvider provideTitles - * @codingStandardsIgnoreStart Ignore long line warning * See http://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.dataProvider - * @codingStandardsIgnoreEnd */ + // @codingStandardsIgnoreEnd public function testCreateBasicListOfTitles( $titleName, $ns, $text ) { $title = Title::newFromText( $titleName, $ns ); $this->assertEquals( $text, "$title", "see if '$titleName' matches '$text'" ); @@ -95,7 +95,7 @@ class TestSample extends MediaWikiLangTestCase { $this->assertTrue( $title->isLocal() ); } - // @codingStandardsIgnoreStart Ignore long line warning + // @codingStandardsIgnoreStart Generic.Files.LineLength /** * @expectedException InvalidArgumentException * See http://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.expectedException