Amire80 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/243392

Change subject: Fix Generic.Files.LineLength phpcs check in 13 files under 
tests/phpunit/includes/api
......................................................................

Fix Generic.Files.LineLength phpcs check in 13 files under 
tests/phpunit/includes/api

Bug: T102614
Change-Id: Ic0b3d9b58fee8dc20a976ae65dcb7072a3afc3b1
---
M tests/phpunit/includes/api/ApiContinuationManagerTest.php
M tests/phpunit/includes/api/ApiEditPageTest.php
M tests/phpunit/includes/api/ApiErrorFormatterTest.php
M tests/phpunit/includes/api/ApiMainTest.php
M tests/phpunit/includes/api/ApiModuleManagerTest.php
M tests/phpunit/includes/api/ApiResultTest.php
M tests/phpunit/includes/api/ApiRevisionDeleteTest.php
M tests/phpunit/includes/api/format/ApiFormatDbgTest.php
M tests/phpunit/includes/api/format/ApiFormatJsonTest.php
M tests/phpunit/includes/api/format/ApiFormatNoneTest.php
M tests/phpunit/includes/api/format/ApiFormatPhpTest.php
M tests/phpunit/includes/api/format/ApiFormatTxtTest.php
M tests/phpunit/includes/api/format/ApiFormatXmlTest.php
13 files changed, 241 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/243392/1

diff --git a/tests/phpunit/includes/api/ApiContinuationManagerTest.php 
b/tests/phpunit/includes/api/ApiContinuationManagerTest.php
index 2edf0c6..30b679d 100644
--- a/tests/phpunit/includes/api/ApiContinuationManagerTest.php
+++ b/tests/phpunit/includes/api/ApiContinuationManagerTest.php
@@ -168,13 +168,18 @@
                        );
                }
 
-               $manager = self::getManager( '||mock2', array_slice( 
$allModules, 0, 2 ), array( 'mock1', 'mock2' ) );
+               $manager = self::getManager(
+                       '||mock2',
+                       array_slice( $allModules, 0, 2 ),
+                       array( 'mock1', 'mock2' )
+               );
                try {
                        $manager->addContinueParam( $allModules[1], 
'm2continue', 1 );
                        $this->fail( 'Expected exception not thrown' );
                } catch ( UnexpectedValueException $ex ) {
                        $this->assertSame(
-                               'Module \'mock2\' was not supposed to have been 
executed, but it was executed anyway',
+                               'Module \'mock2\' was not supposed to have been 
executed, ' .
+                                       'but it was executed anyway',
                                $ex->getMessage(),
                                'Expected exception'
                        );
@@ -184,7 +189,8 @@
                        $this->fail( 'Expected exception not thrown' );
                } catch ( UnexpectedValueException $ex ) {
                        $this->assertSame(
-                               'Module \'mocklist\' called 
ApiContinuationManager::addContinueParam but was not passed to 
ApiContinuationManager::__construct',
+                               'Module \'mocklist\' called 
ApiContinuationManager::addContinueParam ' .
+                                       'but was not passed to 
ApiContinuationManager::__construct',
                                $ex->getMessage(),
                                'Expected exception'
                        );
diff --git a/tests/phpunit/includes/api/ApiEditPageTest.php 
b/tests/phpunit/includes/api/ApiEditPageTest.php
index 6a24281..4a90bf8 100644
--- a/tests/phpunit/includes/api/ApiEditPageTest.php
+++ b/tests/phpunit/includes/api/ApiEditPageTest.php
@@ -475,7 +475,8 @@
        public function testCheckDirectApiEditingDisallowed_forNonTextContent() 
{
                $this->setExpectedException(
                        'UsageException',
-                       'Direct editing via API is not supported for content 
model testing used by Dummy:ApiEditPageTest_nonTextPageEdit'
+                       'Direct editing via API is not supported for content 
model ' .
+                               'testing used by 
Dummy:ApiEditPageTest_nonTextPageEdit'
                );
 
                $this->doApiRequestWithToken( array(
diff --git a/tests/phpunit/includes/api/ApiErrorFormatterTest.php 
b/tests/phpunit/includes/api/ApiErrorFormatterTest.php
index 8ebdf60..3e5f355 100644
--- a/tests/phpunit/includes/api/ApiErrorFormatterTest.php
+++ b/tests/phpunit/includes/api/ApiErrorFormatterTest.php
@@ -130,13 +130,21 @@
                                array(
                                        'errors' => array(
                                                'err' => array(
-                                                       array( 'code' => 
'mainpage', 'message' => 'mainpage', 'params' => array( $I => 'param' ) ),
+                                                       array(
+                                                               'code' => 
'mainpage',
+                                                               'message' => 
'mainpage',
+                                                               'params' => 
array( $I => 'param' )
+                                                       ),
                                                        $I => 'error',
                                                ),
                                        ),
                                        'warnings' => array(
                                                'string' => array(
-                                                       array( 'code' => 
'mainpage', 'message' => 'mainpage', 'params' => array( $I => 'param' ) ),
+                                                       array(
+                                                               'code' => 
'mainpage',
+                                                               'message' => 
'mainpage',
+                                                               'params' => 
array( $I => 'param' )
+                                                       ),
                                                        $I => 'warning',
                                                ),
                                        ),
@@ -144,24 +152,44 @@
                                array(
                                        'errors' => array(
                                                'errWithData' => array(
-                                                       array( 'code' => 
'overriddenCode', 'message' => 'mainpage', 'params' => array( $I => 'param' ),
-                                                               
'overriddenData' => true ),
+                                                       array(
+                                                               'code' => 
'overriddenCode',
+                                                               'message' => 
'mainpage',
+                                                               'params' => 
array( $I => 'param' ),
+                                                               
'overriddenData' => true
+                                                       ),
                                                        $I => 'error',
                                                ),
                                        ),
                                        'warnings' => array(
                                                'messageWithData' => array(
-                                                       array( 'code' => 
'overriddenCode', 'message' => 'mainpage', 'params' => array( $I => 'param' ),
-                                                               
'overriddenData' => true ),
+                                                       array(
+                                                               'code' => 
'overriddenCode',
+                                                               'message' => 
'mainpage',
+                                                               'params' => 
array( $I => 'param' ),
+                                                               
'overriddenData' => true
+                                                       ),
                                                        $I => 'warning',
                                                ),
                                                'message' => array(
-                                                       array( 'code' => 
'mainpage', 'message' => 'mainpage', 'params' => array( $I => 'param' ) ),
+                                                       array(
+                                                               'code' => 
'mainpage',
+                                                               'message' => 
'mainpage',
+                                                               'params' => 
array( $I => 'param' )
+                                                       ),
                                                        $I => 'warning',
                                                ),
                                                'foo' => array(
-                                                       array( 'code' => 
'mainpage', 'message' => 'mainpage', 'params' => array( $I => 'param' ) ),
-                                                       array( 'code' => 
'parentheses', 'message' => 'parentheses', 'params' => array( 'foobar', $I => 
'param' ) ),
+                                                       array(
+                                                               'code' => 
'mainpage',
+                                                               'message' => 
'mainpage',
+                                                               'params' => 
array( $I => 'param' )
+                                                       ),
+                                                       array(
+                                                               'code' => 
'parentheses',
+                                                               'message' => 
'parentheses',
+                                                               'params' => 
array( 'foobar', $I => 'param' )
+                                                       ),
                                                        $I => 'warning',
                                                ),
                                        ),
@@ -169,17 +197,37 @@
                                array(
                                        'errors' => array(
                                                'status' => array(
-                                                       array( 'code' => 
'mainpage', 'message' => 'mainpage', 'params' => array( $I => 'param' ) ),
-                                                       array( 'code' => 
'parentheses', 'message' => 'parentheses', 'params' => array( 'foobar', $I => 
'param' ) ),
+                                                       array(
+                                                               'code' => 
'mainpage',
+                                                               'message' => 
'mainpage',
+                                                               'params' => 
array( $I => 'param' )
+                                                       ),
+                                                       array(
+                                                               'code' => 
'parentheses',
+                                                               'message' => 
'parentheses',
+                                                               'params' => 
array( 'foobar', $I => 'param' )
+                                                       ),
                                                        $I => 'error',
                                                ),
                                        ),
                                        'warnings' => array(
                                                'status' => array(
-                                                       array( 'code' => 
'mainpage', 'message' => 'mainpage', 'params' => array( $I => 'param' ) ),
-                                                       array( 'code' => 
'parentheses', 'message' => 'parentheses', 'params' => array( 'foobar', $I => 
'param' ) ),
-                                                       array( 'code' => 
'overriddenCode', 'message' => 'mainpage', 'params' => array( $I => 'param' ),
-                                                               
'overriddenData' => true ),
+                                                       array(
+                                                               'code' => 
'mainpage',
+                                                               'message' => 
'mainpage',
+                                                               'params' => 
array( $I => 'param' )
+                                                       ),
+                                                       array(
+                                                               'code' => 
'parentheses',
+                                                               'message' => 
'parentheses',
+                                                               'params' => 
array( 'foobar', $I => 'param' )
+                                                       ),
+                                                       array(
+                                                               'code' => 
'overriddenCode',
+                                                               'message' => 
'mainpage',
+                                                               'params' => 
array( $I => 'param' ),
+                                                               
'overriddenData' => true
+                                                       ),
                                                        $I => 'warning',
                                                ),
                                        ),
@@ -328,8 +376,16 @@
                $I = ApiResult::META_INDEXED_TAG_NAME;
                $this->assertSame(
                        array(
-                               array( 'type' => 'error', 'message' => 
'mainpage', 'params' => array( $I => 'param' ) ),
-                               array( 'type' => 'error', 'message' => 
'parentheses', 'params' => array( 'foobar', $I => 'param' ) ),
+                               array(
+                                       'type' => 'error',
+                                       'message' => 'mainpage',
+                                       'params' => array( $I => 'param' )
+                               ),
+                               array(
+                                       'type' => 'error',
+                                       'message' => 'parentheses',
+                                       'params' => array( 'foobar', $I => 
'param' )
+                               ),
                                $I => 'error',
                        ),
                        $formatter->arrayFromStatus( $status, 'error' ),
@@ -337,10 +393,26 @@
                );
                $this->assertSame(
                        array(
-                               array( 'type' => 'warning', 'message' => 
'mainpage', 'params' => array( $I => 'param' ) ),
-                               array( 'type' => 'warning', 'message' => 
'parentheses', 'params' => array( 'foobar', $I => 'param' ) ),
-                               array( 'message' => 'mainpage', 'params' => 
array( $I => 'param' ), 'type' => 'warning' ),
-                               array( 'message' => 'mainpage', 'params' => 
array( $I => 'param' ), 'type' => 'warning' ),
+                               array(
+                                       'type' => 'warning',
+                                       'message' => 'mainpage',
+                                       'params' => array( $I => 'param' )
+                               ),
+                               array(
+                                       'type' => 'warning',
+                                       'message' => 'parentheses',
+                                       'params' => array( 'foobar', $I => 
'param' )
+                               ),
+                               array(
+                                       'message' => 'mainpage',
+                                       'params' => array( $I => 'param' ),
+                                       'type' => 'warning'
+                               ),
+                               array(
+                                       'message' => 'mainpage',
+                                       'params' => array( $I => 'param' ),
+                                       'type' => 'warning'
+                               ),
                                $I => 'warning',
                        ),
                        $formatter->arrayFromStatus( $status, 'warning' ),
diff --git a/tests/phpunit/includes/api/ApiMainTest.php 
b/tests/phpunit/includes/api/ApiMainTest.php
index 94b741d..aef4815 100644
--- a/tests/phpunit/includes/api/ApiMainTest.php
+++ b/tests/phpunit/includes/api/ApiMainTest.php
@@ -90,7 +90,9 @@
         * @param int $status Expected response status
         * @param bool $post Request is a POST
         */
-       public function testCheckConditionalRequestHeaders( $headers, 
$conditions, $status, $post = false ) {
+       public function testCheckConditionalRequestHeaders(
+               $headers, $conditions, $status, $post = false
+       ) {
                $request = new FauxRequest( array( 'action' => 'query', 'meta' 
=> 'siteinfo' ), $post );
                $request->setHeaders( $headers );
                $request->response()->statusHeader( 200 ); // Why doesn't it 
default?
@@ -186,7 +188,9 @@
         * @param bool $isError $isError flag
         * @param bool $post Request is a POST
         */
-       public function testConditionalRequestHeadersOutput( $conditions, 
$headers, $isError = false, $post = false ) {
+       public function testConditionalRequestHeadersOutput(
+               $conditions, $headers, $isError = false, $post = false
+       ) {
                $request = new FauxRequest( array( 'action' => 'query', 'meta' 
=> 'siteinfo' ), $post );
                $response = $request->response();
 
diff --git a/tests/phpunit/includes/api/ApiModuleManagerTest.php 
b/tests/phpunit/includes/api/ApiModuleManagerTest.php
index dab81e1..5e74f13 100644
--- a/tests/phpunit/includes/api/ApiModuleManagerTest.php
+++ b/tests/phpunit/includes/api/ApiModuleManagerTest.php
@@ -307,12 +307,24 @@
                $moduleManager->addModules( $fooModules, 'foo' );
                $moduleManager->addModules( $barModules, 'bar' );
 
-               $this->assertEquals( 'ApiLogin', $moduleManager->getClassName( 
'login' ) );
-               $this->assertEquals( 'ApiLogout', $moduleManager->getClassName( 
'logout' ) );
-               $this->assertEquals( 'ApiFeedContributions', 
$moduleManager->getClassName( 'feedcontributions' ) );
-               $this->assertEquals( 'ApiFeedRecentChanges', 
$moduleManager->getClassName( 'feedrecentchanges' ) );
-               $this->assertFalse( $moduleManager->getClassName( 
'nonexistentmodule' ) );
+               $this->assertEquals(
+                       'ApiLogin',
+                       $moduleManager->getClassName( 'login' )
+               );
+               $this->assertEquals(
+                       'ApiLogout',
+                       $moduleManager->getClassName( 'logout' )
+               );
+               $this->assertEquals(
+                       'ApiFeedContributions',
+                       $moduleManager->getClassName( 'feedcontributions' )
+               );
+               $this->assertEquals(
+                       'ApiFeedRecentChanges',
+                       $moduleManager->getClassName( 'feedrecentchanges' )
+               );
+               $this->assertFalse(
+                       $moduleManager->getClassName( 'nonexistentmodule' )
+               );
        }
-
-
 }
diff --git a/tests/phpunit/includes/api/ApiResultTest.php 
b/tests/phpunit/includes/api/ApiResultTest.php
index 2f31677..d43db71 100644
--- a/tests/phpunit/includes/api/ApiResultTest.php
+++ b/tests/phpunit/includes/api/ApiResultTest.php
@@ -973,7 +973,12 @@
                                        'kvpmerge' => array(
                                                $kvp( 'name', 'x', 'value', 'a' 
),
                                                $kvp( 'name', 'y', 'value', 
array( 'b', ApiResult::META_TYPE => 'array' ) ),
-                                               array( 'name' => 'z', 'c' => 
'd', ApiResult::META_TYPE => 'assoc', ApiResult::META_PRESERVE_KEYS => array( 
'name' ) ),
+                                               array(
+                                                       'name' => 'z',
+                                                       'c' => 'd',
+                                                       ApiResult::META_TYPE => 
'assoc',
+                                                       
ApiResult::META_PRESERVE_KEYS => array( 'name' )
+                                               ),
                                                ApiResult::META_TYPE => 'array',
                                                ApiResult::META_KVP_MERGE => 
true,
                                        ),
@@ -1011,7 +1016,11 @@
                                        'kvpmerge' => array(
                                                $kvp( 'name', 'x', '*', 'a' ),
                                                $kvp( 'name', 'y', '*', array( 
'b', ApiResult::META_TYPE => 'array' ) ),
-                                               array( 'name' => 'z', 'c' => 
'd', ApiResult::META_TYPE => 'assoc', ApiResult::META_PRESERVE_KEYS => array( 
'name' ) ),
+                                               array(
+                                                       'name' => 'z',
+                                                       'c' => 'd',
+                                                       ApiResult::META_TYPE => 
'assoc',
+                                                       
ApiResult::META_PRESERVE_KEYS => array( 'name' ) ),
                                                ApiResult::META_TYPE => 'array',
                                                ApiResult::META_KVP_MERGE => 
true,
                                        ),
@@ -1053,7 +1062,12 @@
                                        'kvpmerge' => array(
                                                (object)$kvp( 'name', 'x', 
'value', 'a' ),
                                                (object)$kvp( 'name', 'y', 
'value', array( 'b', ApiResult::META_TYPE => 'array' ) ),
-                                               (object)array( 'name' => 'z', 
'c' => 'd', ApiResult::META_TYPE => 'assoc', ApiResult::META_PRESERVE_KEYS => 
array( 'name' ) ),
+                                               (object)array(
+                                                       'name' => 'z',
+                                                       'c' => 'd',
+                                                       ApiResult::META_TYPE => 
'assoc',
+                                                       
ApiResult::META_PRESERVE_KEYS => array( 'name' )
+                                               ),
                                                ApiResult::META_TYPE => 'array',
                                                ApiResult::META_KVP_MERGE => 
true,
                                        ),
diff --git a/tests/phpunit/includes/api/ApiRevisionDeleteTest.php 
b/tests/phpunit/includes/api/ApiRevisionDeleteTest.php
index 362d647..575859b 100644
--- a/tests/phpunit/includes/api/ApiRevisionDeleteTest.php
+++ b/tests/phpunit/includes/api/ApiRevisionDeleteTest.php
@@ -14,12 +14,16 @@
 
        protected function setUp() {
                // Needs to be before setup since this gets cached
-               $this->mergeMwGlobalArrayValue( 'wgGroupPermissions', array( 
'sysop' => array( 'deleterevision' => true ) ) );
+               $this->mergeMwGlobalArrayValue(
+                       'wgGroupPermissions',
+                       array( 'sysop' => array( 'deleterevision' => true ) )
+               );
                parent::setUp();
                // Make a few edits for us to play with
                for ( $i = 1; $i <= 5; $i++ ) {
                        self::editPage( self::$page, MWCryptRand::generateHex( 
10 ), 'summary' );
-                       $this->revs[] = Title::newFromText( self::$page 
)->getLatestRevID( Title::GAID_FOR_UPDATE );
+                       $this->revs[] = Title::newFromText( self::$page )
+                               ->getLatestRevID( Title::GAID_FOR_UPDATE );
                }
 
        }
diff --git a/tests/phpunit/includes/api/format/ApiFormatDbgTest.php 
b/tests/phpunit/includes/api/format/ApiFormatDbgTest.php
index 3fcfc73..ffc0e1c 100644
--- a/tests/phpunit/includes/api/format/ApiFormatDbgTest.php
+++ b/tests/phpunit/includes/api/format/ApiFormatDbgTest.php
@@ -29,18 +29,55 @@
                        array( array( 'fóo' ), "array ({$warning}\n  0 => 
'fóo',\n)" ),
 
                        // Arrays and objects
-                       array( array( array() ), "array ({$warning}\n  0 => \n  
array (\n  ),\n)" ),
-                       array( array( array( 1 ) ), "array ({$warning}\n  0 => 
\n  array (\n    0 => 1,\n  ),\n)" ),
-                       array( array( array( 'x' => 1 ) ), "array ({$warning}\n 
 0 => \n  array (\n    'x' => 1,\n  ),\n)" ),
-                       array( array( array( 2 => 1 ) ), "array ({$warning}\n  
0 => \n  array (\n    2 => 1,\n  ),\n)" ),
-                       array( array( (object)array() ), "array ({$warning}\n  
0 => \n  array (\n  ),\n)" ),
-                       array( array( array( 1, ApiResult::META_TYPE => 'assoc' 
) ), "array ({$warning}\n  0 => \n  array (\n    0 => 1,\n  ),\n)" ),
-                       array( array( array( 'x' => 1, ApiResult::META_TYPE => 
'array' ) ), "array ({$warning}\n  0 => \n  array (\n    0 => 1,\n  ),\n)" ),
-                       array( array( array( 'x' => 1, ApiResult::META_TYPE => 
'kvp' ) ), "array ({$warning}\n  0 => \n  array (\n    'x' => 1,\n  ),\n)" ),
-                       array( array( array( 'x' => 1, ApiResult::META_TYPE => 
'BCkvp', ApiResult::META_KVP_KEY_NAME => 'key' ) ),
-                               "array ({$warning}\n  0 => \n  array (\n    0 
=> \n    array (\n      'key' => 'x',\n      '*' => 1,\n    ),\n  ),\n)" ),
-                       array( array( array( 'x' => 1, ApiResult::META_TYPE => 
'BCarray' ) ), "array ({$warning}\n  0 => \n  array (\n    'x' => 1,\n  ),\n)" 
),
-                       array( array( array( 'a', 'b', ApiResult::META_TYPE => 
'BCassoc' ) ), "array ({$warning}\n  0 => \n  array (\n    0 => 'a',\n    1 => 
'b',\n  ),\n)" ),
+                       array(
+                               array( array() ),
+                               "array ({$warning}\n  0 => \n  array (\n  ),\n)"
+                       ),
+                       array(
+                               array( array( 1 ) ),
+                               "array ({$warning}\n  0 => \n  array (\n    0 
=> 1,\n  ),\n)"
+                       ),
+                       array(
+                               array( array( 'x' => 1 ) ),
+                               "array ({$warning}\n  0 => \n  array (\n    'x' 
=> 1,\n  ),\n)"
+                       ),
+                       array(
+                               array( array( 2 => 1 ) ),
+                               "array ({$warning}\n  0 => \n  array (\n    2 
=> 1,\n  ),\n)"
+                       ),
+                       array(
+                               array( (object)array() ),
+                               "array ({$warning}\n  0 => \n  array (\n  ),\n)"
+                       ),
+                       array(
+                               array( array( 1, ApiResult::META_TYPE => 
'assoc' ) ),
+                               "array ({$warning}\n  0 => \n  array (\n    0 
=> 1,\n  ),\n)"
+                       ),
+                       array(
+                               array( array( 'x' => 1, ApiResult::META_TYPE => 
'array' ) ),
+                               "array ({$warning}\n  0 => \n  array (\n    0 
=> 1,\n  ),\n)"
+                       ),
+                       array(
+                               array( array( 'x' => 1, ApiResult::META_TYPE => 
'kvp' ) ),
+                               "array ({$warning}\n  0 => \n  array (\n    'x' 
=> 1,\n  ),\n)"
+                       ),
+                       array(
+                               array( array(
+                                       'x' => 1,
+                                       ApiResult::META_TYPE => 'BCkvp',
+                                       ApiResult::META_KVP_KEY_NAME => 'key'
+                               ) ),
+                               "array ({$warning}\n  0 => \n  array (\n    0 
=> \n    ' .
+                                       'array (\n      'key' => 'x',\n      
'*' => 1,\n    ),\n  ),\n)"
+                       ),
+                       array(
+                               array( array( 'x' => 1, ApiResult::META_TYPE => 
'BCarray' ) ),
+                               "array ({$warning}\n  0 => \n  array (\n    'x' 
=> 1,\n  ),\n)"
+                       ),
+                       array(
+                               array( array( 'a', 'b', ApiResult::META_TYPE => 
'BCassoc' ) ),
+                               "array ({$warning}\n  0 => \n  array (\n    0 
=> 'a',\n    1 => 'b',\n  ),\n)"
+                       ),
 
                        // Content
                        array( array( 'content' => 'foo', 
ApiResult::META_CONTENT => 'content' ),
diff --git a/tests/phpunit/includes/api/format/ApiFormatJsonTest.php 
b/tests/phpunit/includes/api/format/ApiFormatJsonTest.php
index 3dfcaf0..f7ffcb9 100644
--- a/tests/phpunit/includes/api/format/ApiFormatJsonTest.php
+++ b/tests/phpunit/includes/api/format/ApiFormatJsonTest.php
@@ -44,8 +44,14 @@
                                array( array( array( 1, ApiResult::META_TYPE => 
'assoc' ) ), '[{"0":1}]' ),
                                array( array( array( 'x' => 1, 
ApiResult::META_TYPE => 'array' ) ), '[[1]]' ),
                                array( array( array( 'x' => 1, 
ApiResult::META_TYPE => 'kvp' ) ), '[{"x":1}]' ),
-                               array( array( array( 'x' => 1, 
ApiResult::META_TYPE => 'BCkvp', ApiResult::META_KVP_KEY_NAME => 'key' ) ),
-                                       '[[{"key":"x","*":1}]]' ),
+                               array(
+                                       array( array(
+                                               'x' => 1,
+                                               ApiResult::META_TYPE => 'BCkvp',
+                                               ApiResult::META_KVP_KEY_NAME => 
'key'
+                                       ) ),
+                                       '[[{"key":"x","*":1}]]'
+                               ),
                                array( array( array( 'x' => 1, 
ApiResult::META_TYPE => 'BCarray' ) ), '[{"x":1}]' ),
                                array( array( array( 'a', 'b', 
ApiResult::META_TYPE => 'BCassoc' ) ), '[["a","b"]]' ),
 
@@ -85,10 +91,23 @@
                                array( array( array( 1, ApiResult::META_TYPE => 
'assoc' ) ), '[{"0":1}]' ),
                                array( array( array( 'x' => 1, 
ApiResult::META_TYPE => 'array' ) ), '[[1]]' ),
                                array( array( array( 'x' => 1, 
ApiResult::META_TYPE => 'kvp' ) ), '[{"x":1}]' ),
-                               array( array( array( 'x' => 1, 
ApiResult::META_TYPE => 'BCkvp', ApiResult::META_KVP_KEY_NAME => 'key' ) ),
-                                       '[{"x":1}]' ),
+                               array(
+                                       array( array(
+                                               'x' => 1,
+                                               ApiResult::META_TYPE => 'BCkvp',
+                                               ApiResult::META_KVP_KEY_NAME => 
'key'
+                                       ) ),
+                                       '[{"x":1}]'
+                               ),
                                array( array( array( 'x' => 1, 
ApiResult::META_TYPE => 'BCarray' ) ), '[[1]]' ),
-                               array( array( array( 'a', 'b', 
ApiResult::META_TYPE => 'BCassoc' ) ), '[{"0":"a","1":"b"}]' ),
+                               array(
+                                       array( array(
+                                               'a',
+                                               'b',
+                                               ApiResult::META_TYPE => 
'BCassoc'
+                                       ) ),
+                                       '[{"0":"a","1":"b"}]'
+                               ),
 
                                // Content
                                array( array( 'content' => 'foo', 
ApiResult::META_CONTENT => 'content' ),
diff --git a/tests/phpunit/includes/api/format/ApiFormatNoneTest.php 
b/tests/phpunit/includes/api/format/ApiFormatNoneTest.php
index 8f81a41..c0192bc 100644
--- a/tests/phpunit/includes/api/format/ApiFormatNoneTest.php
+++ b/tests/phpunit/includes/api/format/ApiFormatNoneTest.php
@@ -29,7 +29,14 @@
                        array( array( array( 1, ApiResult::META_TYPE => 'assoc' 
) ), '' ),
                        array( array( array( 'x' => 1, ApiResult::META_TYPE => 
'array' ) ), '' ),
                        array( array( array( 'x' => 1, ApiResult::META_TYPE => 
'kvp' ) ), '' ),
-                       array( array( array( 'x' => 1, ApiResult::META_TYPE => 
'BCkvp', ApiResult::META_KVP_KEY_NAME => 'key' ) ), '' ),
+                       array(
+                               array( array(
+                                       'x' => 1,
+                                       ApiResult::META_TYPE => 'BCkvp',
+                                       ApiResult::META_KVP_KEY_NAME => 'key'
+                               ) ),
+                               ''
+                       ),
                        array( array( array( 'x' => 1, ApiResult::META_TYPE => 
'BCarray' ) ), '' ),
                        array( array( array( 'a', 'b', ApiResult::META_TYPE => 
'BCassoc' ) ), '' ),
 
diff --git a/tests/phpunit/includes/api/format/ApiFormatPhpTest.php 
b/tests/phpunit/includes/api/format/ApiFormatPhpTest.php
index 09c7c0c..745686f 100644
--- a/tests/phpunit/includes/api/format/ApiFormatPhpTest.php
+++ b/tests/phpunit/includes/api/format/ApiFormatPhpTest.php
@@ -20,6 +20,7 @@
        }
 
        public static function provideGeneralEncoding() {
+               // @codingStandardsIgnoreStart Generic.Files.LineLength
                return array_merge(
                        self::addFormatVersion( 1, array(
                                // Basic types
@@ -96,6 +97,7 @@
                                        'a:1:{s:3:"foo";s:3:"foo";}' ),
                        ) )
                );
+               // @codingStandardsIgnoreEnd
        }
 
        public function testCrossDomainMangling() {
diff --git a/tests/phpunit/includes/api/format/ApiFormatTxtTest.php 
b/tests/phpunit/includes/api/format/ApiFormatTxtTest.php
index b0a2a96..1576c1d 100644
--- a/tests/phpunit/includes/api/format/ApiFormatTxtTest.php
+++ b/tests/phpunit/includes/api/format/ApiFormatTxtTest.php
@@ -29,6 +29,7 @@
                        array( array( 'fóo' ), "Array\n({$warning}\n    [0] => 
fóo\n)\n" ),
 
                        // Arrays and objects
+                       // @codingStandardsIgnoreStart Generic.Files.LineLength
                        array( array( array() ), "Array\n({$warning}\n    [0] 
=> Array\n        (\n        )\n\n)\n" ),
                        array( array( array( 1 ) ), "Array\n({$warning}\n    
[0] => Array\n        (\n            [0] => 1\n        )\n\n)\n" ),
                        array( array( array( 'x' => 1 ) ), 
"Array\n({$warning}\n    [0] => Array\n        (\n            [x] => 1\n        
)\n\n)\n" ),
@@ -49,6 +50,7 @@
                        // BC Subelements
                        array( array( 'foo' => 'foo', 
ApiResult::META_BC_SUBELEMENTS => array( 'foo' ) ),
                                "Array\n({$warning}\n    [foo] => Array\n       
 (\n            [*] => foo\n        )\n\n)\n" ),
+                       // @codingStandardsIgnoreEnd
                );
        }
 
diff --git a/tests/phpunit/includes/api/format/ApiFormatXmlTest.php 
b/tests/phpunit/includes/api/format/ApiFormatXmlTest.php
index 7babaed..0b7ae35 100644
--- a/tests/phpunit/includes/api/format/ApiFormatXmlTest.php
+++ b/tests/phpunit/includes/api/format/ApiFormatXmlTest.php
@@ -12,9 +12,11 @@
        public static function setUpBeforeClass() {
                parent::setUpBeforeClass();
                $page = WikiPage::factory( Title::newFromText( 
'MediaWiki:ApiFormatXmlTest.xsl' ) );
+               // @codingStandardsIgnoreStart Generic.Files.LineLength
                $page->doEditContent( new WikitextContent(
                        '<?xml version="1.0"?><xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; />'
                ), 'Summary' );
+               // @codingStandardsIgnoreEnd
                $page = WikiPage::factory( Title::newFromText( 
'MediaWiki:ApiFormatXmlTest' ) );
                $page->doEditContent( new WikitextContent( 'Bogus' ), 'Summary' 
);
                $page = WikiPage::factory( Title::newFromText( 
'ApiFormatXmlTest' ) );
@@ -22,6 +24,7 @@
        }
 
        public static function provideGeneralEncoding() {
+               // @codingStandardsIgnoreStart Generic.Files.LineLength
                return array(
                        // Basic types
                        array( array( null, 'a' => null ), '<?xml 
version="1.0"?><api><_v _idx="0" /></api>' ),
@@ -114,6 +117,7 @@
                                        '" type="text/xsl" ?><api />',
                                array( 'xslt' => 
'MediaWiki:ApiFormatXmlTest.xsl' ) ),
                );
+               // @codingStandardsIgnoreEnd
        }
 
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/243392
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0b3d9b58fee8dc20a976ae65dcb7072a3afc3b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to