From f9d0c98e16c69ad6881d977a7b0083b5c509c406 Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Wed, 30 Sep 2015 11:01:28 +0300 Subject: [PATCH] Make lines short to pass phpcs in 2 files under tests/phpunit/includes/ Bug: T102614 Change-Id: I21a7cbc40a3015c3d6cbea1b9d7df58a358beb6a --- tests/phpunit/includes/TitleTest.php | 12 ++++++-- tests/phpunit/includes/WikiMapTest.php | 42 ++++++++++++++++++++++---- 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/tests/phpunit/includes/TitleTest.php b/tests/phpunit/includes/TitleTest.php index 5ede0ab2fa..e88eb21ae7 100644 --- a/tests/phpunit/includes/TitleTest.php +++ b/tests/phpunit/includes/TitleTest.php @@ -657,7 +657,15 @@ class TitleTest extends MediaWikiTestCase { $linkCache->clearLink( $title ); $linkCache->addBadLinkObj( $title ); - $this->assertEquals( false, $title->exists(), 'exists() should rely on link cache unless GAID_FOR_UPDATE is used' ); - $this->assertEquals( true, $title->exists( Title::GAID_FOR_UPDATE ), 'exists() should re-query database when GAID_FOR_UPDATE is used' ); + $this->assertEquals( + false, + $title->exists(), + 'exists() should rely on link cache unless GAID_FOR_UPDATE is used' + ); + $this->assertEquals( + true, + $title->exists( Title::GAID_FOR_UPDATE ), + 'exists() should re-query database when GAID_FOR_UPDATE is used' + ); } } diff --git a/tests/phpunit/includes/WikiMapTest.php b/tests/phpunit/includes/WikiMapTest.php index bfb99f23c9..3219d1dffb 100644 --- a/tests/phpunit/includes/WikiMapTest.php +++ b/tests/phpunit/includes/WikiMapTest.php @@ -62,8 +62,19 @@ class WikiMapTest extends MediaWikiLangTestCase { public function provideMakeForeignLink() { return array( 'unknown' => array( false, 'xyzzy', 'Foo' ), - 'enwiki' => array( 'Foo', 'enwiki', 'Foo' ), - 'ruwiki' => array( 'вар', 'ruwiki', 'Фу', 'вар' ), + 'enwiki' => array( + 'Foo', + 'enwiki', + 'Foo' + ), + 'ruwiki' => array( + 'вар', + 'ruwiki', + 'Фу', + 'вар' + ), ); } @@ -71,14 +82,28 @@ class WikiMapTest extends MediaWikiLangTestCase { * @dataProvider provideMakeForeignLink */ public function testMakeForeignLink( $expected, $wikiId, $page, $text = null ) { - $this->assertEquals( $expected, WikiMap::makeForeignLink( $wikiId, $page, $text ) ); + $this->assertEquals( + $expected, + WikiMap::makeForeignLink( $wikiId, $page, $text ) + ); } public function provideForeignUserLink() { return array( 'unknown' => array( false, 'xyzzy', 'Foo' ), - 'enwiki' => array( 'User:Foo', 'enwiki', 'Foo' ), - 'ruwiki' => array( 'вар', 'ruwiki', 'Фу', 'вар' ), + 'enwiki' => array( + 'User:Foo', + 'enwiki', + 'Foo' + ), + 'ruwiki' => array( + 'вар', + 'ruwiki', + 'Фу', + 'вар' + ), ); } @@ -93,7 +118,12 @@ class WikiMapTest extends MediaWikiLangTestCase { return array( 'unknown' => array( false, 'xyzzy', 'Foo' ), 'enwiki' => array( 'http://en.example.org/w/Foo', 'enwiki', 'Foo' ), - 'ruwiki with fragement' => array( '//ru.example.org/wiki/%D0%A4%D1%83#%D0%B2%D0%B0%D1%80', 'ruwiki', 'Фу', 'вар' ), + 'ruwiki with fragement' => array( + '//ru.example.org/wiki/%D0%A4%D1%83#%D0%B2%D0%B0%D1%80', + 'ruwiki', + 'Фу', + 'вар' + ), ); } -- 2.20.1