Make lines short to pass phpcs in 2 files under tests/phpunit/includes/
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Wed, 30 Sep 2015 08:01:28 +0000 (11:01 +0300)
committerUmherirrender <umherirrender_de.wp@web.de>
Wed, 30 Sep 2015 16:17:35 +0000 (16:17 +0000)
Bug: T102614
Change-Id: I21a7cbc40a3015c3d6cbea1b9d7df58a358beb6a

tests/phpunit/includes/TitleTest.php
tests/phpunit/includes/WikiMapTest.php

index 5ede0ab..e88eb21 100644 (file)
@@ -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'
+               );
        }
 }
index bfb99f2..3219d1d 100644 (file)
@@ -62,8 +62,19 @@ class WikiMapTest extends MediaWikiLangTestCase {
        public function provideMakeForeignLink() {
                return array(
                        'unknown' => array( false, 'xyzzy', 'Foo' ),
-                       'enwiki' => array( '<a class="external" rel="nofollow" href="http://en.example.org/w/Foo">Foo</a>', 'enwiki', 'Foo' ),
-                       'ruwiki' => array( '<a class="external" rel="nofollow" href="//ru.example.org/wiki/%D0%A4%D1%83">вар</a>', 'ruwiki', 'Фу', 'вар' ),
+                       'enwiki' => array(
+                               '<a class="external" rel="nofollow" ' .
+                                       'href="http://en.example.org/w/Foo">Foo</a>',
+                               'enwiki',
+                               'Foo'
+                       ),
+                       'ruwiki' => array(
+                               '<a class="external" rel="nofollow" ' .
+                                       'href="//ru.example.org/wiki/%D0%A4%D1%83">вар</a>',
+                               '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( '<a class="external" rel="nofollow" href="http://en.example.org/w/User:Foo">User:Foo</a>', 'enwiki', 'Foo' ),
-                       'ruwiki' => array( '<a class="external" rel="nofollow" href="//ru.example.org/wiki/User:%D0%A4%D1%83">вар</a>', 'ruwiki', 'Фу', 'вар' ),
+                       'enwiki' => array(
+                               '<a class="external" rel="nofollow" ' .
+                                       'href="http://en.example.org/w/User:Foo">User:Foo</a>',
+                               'enwiki',
+                               'Foo'
+                       ),
+                       'ruwiki' => array(
+                               '<a class="external" rel="nofollow" ' .
+                                       'href="//ru.example.org/wiki/User:%D0%A4%D1%83">вар</a>',
+                               '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',
+                               'Фу',
+                               'вар'
+                       ),
                );
        }