Pass phpcs-strict on some test files (7/11)
authorSiebrand Mazeland <siebrand@kitano.nl>
Thu, 24 Apr 2014 16:06:46 +0000 (18:06 +0200)
committerSiebrand <siebrand@kitano.nl>
Thu, 24 Apr 2014 18:27:12 +0000 (18:27 +0000)
Change-Id: Ia0ceea60e7ef43959f868378f3fcd463a3adf782

tests/phpunit/includes/diff/ArrayDiffFormatterTest.php
tests/phpunit/includes/filebackend/FileBackendTest.php
tests/phpunit/includes/filerepo/StoreBatchTest.php
tests/phpunit/includes/htmlform/HTMLCheckMatrixTest.php
tests/phpunit/includes/installer/InstallDocFormatterTest.php
tests/phpunit/includes/installer/OracleInstallerTest.php
tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php
tests/phpunit/includes/libs/CSSMinTest.php
tests/phpunit/includes/libs/GenericArrayObjectTest.php
tests/phpunit/includes/libs/JavaScriptMinifierTest.php

index 351908b..e914c72 100644 (file)
@@ -93,13 +93,32 @@ class ArrayDiffFormatterTest extends MediaWikiTestCase {
                );
                $otherTestCases[] = array(
                        $this->getMockDiff( array( $this->getMockDiffOp( 'change', array( 'd1' ), array( 'a1' ) ) ) ),
-                       array( array( 'action' => 'change', 'old' => 'd1', 'new' => 'mockLine', 'newline' => 1, 'oldline' => 1 ) ),
+                       array( array(
+                               'action' => 'change',
+                               'old' => 'd1',
+                               'new' => 'mockLine',
+                               'newline' => 1, 'oldline' => 1
+                       ) ),
                );
                $otherTestCases[] = array(
-                       $this->getMockDiff( array( $this->getMockDiffOp( 'change', array( 'd1', 'd2' ), array( 'a1', 'a2' ) ) ) ),
+                       $this->getMockDiff( array( $this->getMockDiffOp(
+                               'change',
+                               array( 'd1', 'd2' ),
+                               array( 'a1', 'a2' )
+                       ) ) ),
                        array(
-                               array( 'action' => 'change', 'old' => 'd1', 'new' => 'mockLine', 'newline' => 1, 'oldline' => 1 ),
-                               array( 'action' => 'change', 'old' => 'd2', 'new' => 'mockLine', 'newline' => 2, 'oldline' => 2 ),
+                               array(
+                                       'action' => 'change',
+                                       'old' => 'd1',
+                                       'new' => 'mockLine',
+                                       'newline' => 1, 'oldline' => 1
+                               ),
+                               array(
+                                       'action' => 'change',
+                                       'old' => 'd2',
+                                       'new' => 'mockLine',
+                                       'newline' => 2, 'oldline' => 2
+                               ),
                        ),
                );
 
index 1220270..a7bfbfe 100644 (file)
@@ -156,7 +156,10 @@ class FileBackendTest extends MediaWikiTestCase {
                        array( 'mwstore://backend/container/path', 'mwstore://backend/container/path' ),
                        array( 'mwstore://backend/container//path', 'mwstore://backend/container/path' ),
                        array( 'mwstore://backend/container///path', 'mwstore://backend/container/path' ),
-                       array( 'mwstore://backend/container///path//to///obj', 'mwstore://backend/container/path/to/obj' ),
+                       array(
+                               'mwstore://backend/container///path//to///obj',
+                               'mwstore://backend/container/path/to/obj'
+                       ),
                        array( 'mwstore://', null ),
                        array( 'mwstore://backend', null ),
                        array( 'mwstore://backend//container/path', null ),
@@ -1234,11 +1237,23 @@ class FileBackendTest extends MediaWikiTestCase {
                        $contents = $this->backend->getFileContentsMulti( array( 'srcs' => $source ) );
                        foreach ( $contents as $path => $data ) {
                                $this->assertNotEquals( false, $data, "Contents of $path exists ($backendName)." );
-                               $this->assertEquals( current( $content ), $data, "Contents of $path is correct ($backendName)." );
+                               $this->assertEquals(
+                                       current( $content ),
+                                       $data,
+                                       "Contents of $path is correct ($backendName)."
+                               );
                                next( $content );
                        }
-                       $this->assertEquals( $source, array_keys( $contents ), "Contents in right order ($backendName)." );
-                       $this->assertEquals( count( $source ), count( $contents ), "Contents array size correct ($backendName)." );
+                       $this->assertEquals(
+                               $source,
+                               array_keys( $contents ),
+                               "Contents in right order ($backendName)."
+                       );
+                       $this->assertEquals(
+                               count( $source ),
+                               count( $contents ),
+                               "Contents array size correct ($backendName)."
+                       );
                } else {
                        $data = $this->backend->getFileContents( array( 'src' => $source ) );
                        $this->assertNotEquals( false, $data, "Contents of $source exists ($backendName)." );
@@ -1297,18 +1312,34 @@ class FileBackendTest extends MediaWikiTestCase {
                                        "Creation of local copy of $path succeeded ($backendName)." );
                                $contents = file_get_contents( $tmpFile->getPath() );
                                $this->assertNotEquals( false, $contents, "Local copy of $path exists ($backendName)." );
-                               $this->assertEquals( current( $content ), $contents, "Local copy of $path is correct ($backendName)." );
+                               $this->assertEquals(
+                                       current( $content ),
+                                       $contents,
+                                       "Local copy of $path is correct ($backendName)."
+                               );
                                next( $content );
                        }
-                       $this->assertEquals( $source, array_keys( $tmpFiles ), "Local copies in right order ($backendName)." );
-                       $this->assertEquals( count( $source ), count( $tmpFiles ), "Local copies array size correct ($backendName)." );
+                       $this->assertEquals(
+                               $source,
+                               array_keys( $tmpFiles ),
+                               "Local copies in right order ($backendName)."
+                       );
+                       $this->assertEquals(
+                               count( $source ),
+                               count( $tmpFiles ),
+                               "Local copies array size correct ($backendName)."
+                       );
                } else {
                        $tmpFile = $this->backend->getLocalCopy( array( 'src' => $source ) );
                        $this->assertNotNull( $tmpFile,
                                "Creation of local copy of $source succeeded ($backendName)." );
                        $contents = file_get_contents( $tmpFile->getPath() );
                        $this->assertNotEquals( false, $contents, "Local copy of $source exists ($backendName)." );
-                       $this->assertEquals( $content[0], $contents, "Local copy of $source is correct ($backendName)." );
+                       $this->assertEquals(
+                               $content[0],
+                               $contents,
+                               "Local copy of $source is correct ($backendName)."
+                       );
                }
 
                $obj = new stdClass();
@@ -1367,11 +1398,23 @@ class FileBackendTest extends MediaWikiTestCase {
                                        "Creation of local copy of $path succeeded ($backendName)." );
                                $contents = file_get_contents( $tmpFile->getPath() );
                                $this->assertNotEquals( false, $contents, "Local ref of $path exists ($backendName)." );
-                               $this->assertEquals( current( $content ), $contents, "Local ref of $path is correct ($backendName)." );
+                               $this->assertEquals(
+                                       current( $content ),
+                                       $contents,
+                                       "Local ref of $path is correct ($backendName)."
+                               );
                                next( $content );
                        }
-                       $this->assertEquals( $source, array_keys( $tmpFiles ), "Local refs in right order ($backendName)." );
-                       $this->assertEquals( count( $source ), count( $tmpFiles ), "Local refs array size correct ($backendName)." );
+                       $this->assertEquals(
+                               $source,
+                               array_keys( $tmpFiles ),
+                               "Local refs in right order ($backendName)."
+                       );
+                       $this->assertEquals(
+                               count( $source ),
+                               count( $tmpFiles ),
+                               "Local refs array size correct ($backendName)."
+                       );
                } else {
                        $tmpFile = $this->backend->getLocalReference( array( 'src' => $source ) );
                        $this->assertNotNull( $tmpFile,
@@ -1950,7 +1993,10 @@ class FileBackendTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $list, "Correct file listing ($backendName)." );
 
                // Actual listing (no trailing slash) at root with advise
-               $iter = $this->backend->getFileList( array( 'dir' => "$base/unittest-cont1", 'adviseStat' => 1 ) );
+               $iter = $this->backend->getFileList( array(
+                       'dir' => "$base/unittest-cont1",
+                       'adviseStat' => 1
+               ) );
                $list = $this->listToArray( $iter );
                sort( $list );
                $this->assertEquals( $expected, $list, "Correct file listing ($backendName)." );
@@ -1983,7 +2029,10 @@ class FileBackendTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $list, "Correct file listing ($backendName)." );
 
                // Actual listing (no trailing slash) at subdir with advise
-               $iter = $this->backend->getFileList( array( 'dir' => "$base/unittest-cont1/e/subdir2/subdir", 'adviseStat' => 1 ) );
+               $iter = $this->backend->getFileList( array(
+                       'dir' => "$base/unittest-cont1/e/subdir2/subdir",
+                       'adviseStat' => 1
+               ) );
                $list = $this->listToArray( $iter );
                sort( $list );
                $this->assertEquals( $expected, $list, "Correct file listing ($backendName)." );
@@ -2019,13 +2068,18 @@ class FileBackendTest extends MediaWikiTestCase {
                sort( $expected );
 
                // Actual listing (top files only) at subdir
-               $iter = $this->backend->getTopFileList( array( 'dir' => "$base/unittest-cont1/e/subdir2/subdir" ) );
+               $iter = $this->backend->getTopFileList(
+                       array( 'dir' => "$base/unittest-cont1/e/subdir2/subdir" )
+               );
                $list = $this->listToArray( $iter );
                sort( $list );
                $this->assertEquals( $expected, $list, "Correct top file listing ($backendName)." );
 
                // Actual listing (top files only) at subdir with advise
-               $iter = $this->backend->getTopFileList( array( 'dir' => "$base/unittest-cont1/e/subdir2/subdir", 'adviseStat' => 1 ) );
+               $iter = $this->backend->getTopFileList( array(
+                       'dir' => "$base/unittest-cont1/e/subdir2/subdir",
+                       'adviseStat' => 1
+               ) );
                $list = $this->listToArray( $iter );
                sort( $list );
                $this->assertEquals( $expected, $list, "Correct top file listing ($backendName)." );
@@ -2162,7 +2216,10 @@ class FileBackendTest extends MediaWikiTestCase {
 
                // Actual listing (with trailing slash)
                $list = array();
-               $iter = $this->backend->getTopDirectoryList( array( 'dir' => "$base/unittest-cont1/e/subdir2/" ) );
+               $iter = $this->backend->getTopDirectoryList(
+                       array( 'dir' => "$base/unittest-cont1/e/subdir2/" )
+               );
+
                foreach ( $iter as $file ) {
                        $list[] = $file;
                }
@@ -2177,7 +2234,11 @@ class FileBackendTest extends MediaWikiTestCase {
                }
                sort( $list );
 
-               $this->assertEquals( $expected, $list, "Correct top dir listing ($backendName), second iteration." );
+               $this->assertEquals(
+                       $expected,
+                       $list,
+                       "Correct top dir listing ($backendName), second iteration."
+               );
 
                // Expected listing (recursive)
                $expected = array(
index 787d83c..3276cf9 100644 (file)
@@ -130,7 +130,17 @@ class StoreBatchTest extends MediaWikiTestCase {
         */
        public function teststore() {
                global $IP;
-               $this->storecohort( "Test1.png", "$IP/skins/monobook/wiki.png", "$IP/skins/monobook/video.png", false );
-               $this->storecohort( "Test2.png", "$IP/skins/monobook/wiki.png", "$IP/skins/monobook/video.png", true );
+               $this->storecohort(
+                       "Test1.png",
+                       "$IP/skins/monobook/wiki.png",
+                       "$IP/skins/monobook/video.png",
+                       false
+               );
+               $this->storecohort(
+                       "Test2.png",
+                       "$IP/skins/monobook/wiki.png",
+                       "$IP/skins/monobook/video.png",
+                       true
+               );
        }
 }
index c41acef..6384e3a 100644 (file)
@@ -30,8 +30,9 @@ class HtmlCheckMatrixTest extends MediaWikiTestCase {
        public function testValidateCallsUserDefinedValidationCallback() {
                $called = false;
                $field = new HTMLCheckMatrix( self::$defaultOptions + array(
-                               'validation-callback' => function() use ( &$called ) {
+                               'validation-callback' => function () use ( &$called ) {
                                                $called = true;
+
                                                return false;
                                        },
                        ) );
index 8466684..064d518 100644 (file)
@@ -48,17 +48,24 @@ class InstallDocFormatterTest extends MediaWikiTestCase {
 
                        # Transform '$wgFooBar' links
                        array(
-                               '<span class="config-plainlink">[https://www.mediawiki.org/wiki/Manual:$wgFooBar $wgFooBar]</span>',
+                               '<span class="config-plainlink">'
+                                       . '[https://www.mediawiki.org/wiki/Manual:$wgFooBar $wgFooBar]</span>',
                                '$wgFooBar', 'Testing basic $wgFooBar' ),
                        array(
-                               '<span class="config-plainlink">[https://www.mediawiki.org/wiki/Manual:$wgFooBar45 $wgFooBar45]</span>',
+                               '<span class="config-plainlink">'
+                                       . '[https://www.mediawiki.org/wiki/Manual:$wgFooBar45 $wgFooBar45]</span>',
                                '$wgFooBar45', 'Testing $wgFooBar45 (with numbers)' ),
                        array(
-                               '<span class="config-plainlink">[https://www.mediawiki.org/wiki/Manual:$wgFoo_Bar $wgFoo_Bar]</span>',
+                               '<span class="config-plainlink">'
+                                       . '[https://www.mediawiki.org/wiki/Manual:$wgFoo_Bar $wgFoo_Bar]</span>',
                                '$wgFoo_Bar', 'Testing $wgFoo_Bar (with underscore)' ),
 
                        # Icky variables that shouldn't link
-                       array( '$myAwesomeVariable', '$myAwesomeVariable', 'Testing $myAwesomeVariable (not starting with $wg)' ),
+                       array(
+                               '$myAwesomeVariable',
+                               '$myAwesomeVariable',
+                               'Testing $myAwesomeVariable (not starting with $wg)'
+                       ),
                        array( '$()not!a&Var', '$()not!a&Var', 'Testing $()not!a&Var (obviously not a variable)' ),
                );
        }
index 66e6559..fdcecf9 100644 (file)
@@ -40,7 +40,11 @@ class OracleInstallerTest extends MediaWikiTestCase {
                        array( true, 'host:1521/service:shared', 'Host, port, service and shared server type' ),
                        array( true, 'host:1521/service:dedicated', 'Host, port, service and dedicated server type' ),
                        array( true, 'host:1521/service:pooled', 'Host, port, service and pooled server type' ),
-                       array( true, 'host:1521/service:shared/instance1', 'Host, port, service, server type and instance' ),
+                       array(
+                               true,
+                               'host:1521/service:shared/instance1',
+                               'Host, port, service, server type and instance'
+                       ),
                        array( true, 'host:1521//instance1', 'Host, port and instance' ),
                );
        }
index 3d2b5d8..3e232a9 100644 (file)
@@ -28,7 +28,11 @@ class RefreshLinksPartitionTest extends MediaWikiTestCase {
                }
 
                $title->getBacklinkCache()->clear();
-               $this->assertEquals( 20, $title->getBacklinkCache()->getNumLinks( 'pagelinks' ), 'Correct number of backlinks' );
+               $this->assertEquals(
+                       20,
+                       $title->getBacklinkCache()->getNumLinks( 'pagelinks' ),
+                       'Correct number of backlinks'
+               );
 
                $job = new RefreshLinksJob( $title, array( 'recursive' => true, 'table' => 'pagelinks' )
                        + Job::newRootJobParams( "refreshlinks:pagelinks:{$title->getPrefixedText()}" ) );
@@ -55,7 +59,12 @@ class RefreshLinksPartitionTest extends MediaWikiTestCase {
                $this->assertEquals( $extraParams['rootJobSignature'], $jobs[9]->params['rootJobSignature'],
                        'Recursive sub-job has root params' );
 
-               $jobs2 = BacklinkJobUtils::partitionBacklinkJob( $jobs[9], 9, 1, array( 'params' => $extraParams ) );
+               $jobs2 = BacklinkJobUtils::partitionBacklinkJob(
+                       $jobs[9],
+                       9,
+                       1,
+                       array( 'params' => $extraParams )
+               );
 
                $this->assertEquals( 10, count( $jobs2 ), 'Correct number of sub-jobs' );
                $this->assertEquals( $pages[9], current( $jobs2[0]->params['pages'] ),
@@ -73,7 +82,12 @@ class RefreshLinksPartitionTest extends MediaWikiTestCase {
                $this->assertEquals( $extraParams['rootJobSignature'], $jobs2[9]->params['rootJobSignature'],
                        'Recursive sub-job has root params' );
 
-               $jobs3 = BacklinkJobUtils::partitionBacklinkJob( $jobs2[9], 9, 1, array( 'params' => $extraParams ) );
+               $jobs3 = BacklinkJobUtils::partitionBacklinkJob(
+                       $jobs2[9],
+                       9,
+                       1,
+                       array( 'params' => $extraParams )
+               );
 
                $this->assertEquals( 2, count( $jobs3 ), 'Correct number of sub-jobs' );
                $this->assertEquals( $pages[18], current( $jobs3[0]->params['pages'] ),
index 5c0487b..5475a82 100644 (file)
@@ -25,7 +25,11 @@ class CSSMinTest extends MediaWikiTestCase {
        public function testMinify( $code, $expectedOutput ) {
                $minified = CSSMin::minify( $code );
 
-               $this->assertEquals( $expectedOutput, $minified, 'Minified output should be in the form expected.' );
+               $this->assertEquals(
+                       $expectedOutput,
+                       $minified,
+                       'Minified output should be in the form expected.'
+               );
        }
 
        public static function provideMinifyCases() {
@@ -69,7 +73,8 @@ class CSSMinTest extends MediaWikiTestCase {
        }
 
        /**
-        * This tests funky parameters to CSSMin::remap. testRemapRemapping tests the basic functionality.
+        * This tests funky parameters to CSSMin::remap. testRemapRemapping tests
+        * the basic functionality.
         *
         * @dataProvider provideRemapCases
         * @covers CSSMin::remap
@@ -78,7 +83,11 @@ class CSSMinTest extends MediaWikiTestCase {
                $remapped = call_user_func_array( 'CSSMin::remap', $params );
 
                $messageAdd = " Case: $message";
-               $this->assertEquals( $expectedOutput, $remapped, 'CSSMin::remap should return the expected url form.' . $messageAdd );
+               $this->assertEquals(
+                       $expectedOutput,
+                       $remapped,
+                       'CSSMin::remap should return the expected url form.' . $messageAdd
+               );
        }
 
        public static function provideRemapCases() {
@@ -201,7 +210,8 @@ class CSSMinTest extends MediaWikiTestCase {
                        array(
                                'Embedded file (inline @embed)',
                                'foo { background: /* @embed */ url(red.gif); }',
-                               "foo { background: url($red); background: url(http://localhost/w/red.gif?timestamp)!ie; }",
+                               "foo { background: url($red); "
+                                       . "background: url(http://localhost/w/red.gif?timestamp)!ie; }",
                        ),
                        array(
                                'Can not embed large files',
@@ -211,27 +221,35 @@ class CSSMinTest extends MediaWikiTestCase {
                        array(
                                'Two regular files in one rule',
                                'foo { background: url(red.gif), url(green.gif); }',
-                               'foo { background: url(http://localhost/w/red.gif?timestamp), url(http://localhost/w/green.gif?timestamp); }',
+                               'foo { background: url(http://localhost/w/red.gif?timestamp), '
+                                       . 'url(http://localhost/w/green.gif?timestamp); }',
                        ),
                        array(
                                'Two embedded files in one rule',
                                'foo { /* @embed */ background: url(red.gif), url(green.gif); }',
-                               "foo { background: url($red), url($green); background: url(http://localhost/w/red.gif?timestamp), url(http://localhost/w/green.gif?timestamp)!ie; }",
+                               "foo { background: url($red), url($green); "
+                                       . "background: url(http://localhost/w/red.gif?timestamp), "
+                                       . "url(http://localhost/w/green.gif?timestamp)!ie; }",
                        ),
                        array(
                                'Two embedded files in one rule (inline @embed)',
                                'foo { background: /* @embed */ url(red.gif), /* @embed */ url(green.gif); }',
-                               "foo { background: url($red), url($green); background: url(http://localhost/w/red.gif?timestamp), url(http://localhost/w/green.gif?timestamp)!ie; }",
+                               "foo { background: url($red), url($green); "
+                                       . "background: url(http://localhost/w/red.gif?timestamp), "
+                                       . "url(http://localhost/w/green.gif?timestamp)!ie; }",
                        ),
                        array(
                                'Two embedded files in one rule (inline @embed), one too large',
                                'foo { background: /* @embed */ url(red.gif), /* @embed */ url(large.png); }',
-                               "foo { background: url($red), url(http://localhost/w/large.png?timestamp); background: url(http://localhost/w/red.gif?timestamp), url(http://localhost/w/large.png?timestamp)!ie; }",
+                               "foo { background: url($red), url(http://localhost/w/large.png?timestamp); "
+                                       . "background: url(http://localhost/w/red.gif?timestamp), "
+                                       . "url(http://localhost/w/large.png?timestamp)!ie; }",
                        ),
                        array(
                                'Practical example with some noise',
                                'foo { /* @embed */ background: #f9f9f9 url(red.gif) 0 0 no-repeat; }',
-                               "foo { background: #f9f9f9 url($red) 0 0 no-repeat; background: #f9f9f9 url(http://localhost/w/red.gif?timestamp) 0 0 no-repeat!ie; }",
+                               "foo { background: #f9f9f9 url($red) 0 0 no-repeat; "
+                                       . "background: #f9f9f9 url(http://localhost/w/red.gif?timestamp) 0 0 no-repeat!ie; }",
                        ),
                        array(
                                'Does not mess with other properties',
@@ -324,7 +342,10 @@ class CSSMinTest extends MediaWikiTestCase {
                        // - Using a tab in a string value (turns into a space)
                        array( "foo { content: '\t'; }", "foo{content:'\t'}" ),
                        // - Using css-like syntax in string values
-                       array( 'foo::after { content: "{;}"; position: absolute; }', 'foo::after{content:"{;}";position:absolute}' ),
+                       array(
+                               'foo::after { content: "{;}"; position: absolute; }',
+                               'foo::after{content:"{;}";position:absolute}'
+                       ),
                );
        }
 }
index 806f5bf..4911f73 100644 (file)
@@ -30,7 +30,8 @@
 abstract class GenericArrayObjectTest extends MediaWikiTestCase {
 
        /**
-        * Returns objects that can serve as elements in the concrete GenericArrayObject deriving class being tested.
+        * Returns objects that can serve as elements in the concrete
+        * GenericArrayObject deriving class being tested.
         *
         * @since 1.20
         *
index 01c330a..c8795b2 100644 (file)
@@ -14,16 +14,28 @@ class JavaScriptMinifierTest extends MediaWikiTestCase {
                         * At some point there was a bug that caused this comment to be ended at '* /',
                         * causing /M... to be left as the beginning of a regex.
                         */
-                       array( "/**\n * Foo\n * {\n * 'bar' : {\n * //Multiple rules with configurable operators\n * 'baz' : false\n * }\n */", "" ),
+                       array(
+                               "/**\n * Foo\n * {\n * 'bar' : {\n * "
+                                       . "//Multiple rules with configurable operators\n * 'baz' : false\n * }\n */",
+                               "" ),
 
                        /**
                         * '  Foo \' bar \
                         *  baz \' quox '  .
                         */
-                       array( "'  Foo  \\'  bar  \\\n  baz  \\'  quox  '  .length", "'  Foo  \\'  bar  \\\n  baz  \\'  quox  '.length" ),
-                       array( "\"  Foo  \\\"  bar  \\\n  baz  \\\"  quox  \"  .length", "\"  Foo  \\\"  bar  \\\n  baz  \\\"  quox  \".length" ),
+                       array(
+                               "'  Foo  \\'  bar  \\\n  baz  \\'  quox  '  .length",
+                               "'  Foo  \\'  bar  \\\n  baz  \\'  quox  '.length"
+                       ),
+                       array(
+                               "\"  Foo  \\\"  bar  \\\n  baz  \\\"  quox  \"  .length",
+                               "\"  Foo  \\\"  bar  \\\n  baz  \\\"  quox  \".length"
+                       ),
                        array( "// Foo b/ar baz", "" ),
-                       array( "/  Foo  \\/  bar  [  /  \\]  /  ]  baz  /  .length", "/  Foo  \\/  bar  [  /  \\]  /  ]  baz  /.length" ),
+                       array(
+                               "/  Foo  \\/  bar  [  /  \\]  /  ]  baz  /  .length",
+                               "/  Foo  \\/  bar  [  /  \\]  /  ]  baz  /.length"
+                       ),
 
                        // HTML comments
                        array( "<!-- Foo bar", "" ),
@@ -49,7 +61,10 @@ class JavaScriptMinifierTest extends MediaWikiTestCase {
 
                        // Semicolon insertion between an expression having an inline
                        // comment after it, and a statement on the next line (bug 27046).
-                       array( "var a = this //foo bar \n for ( b = 0; c < d; b++ ) {}", "var a=this\nfor(b=0;c<d;b++){}" ),
+                       array(
+                               "var a = this //foo bar \n for ( b = 0; c < d; b++ ) {}",
+                               "var a=this\nfor(b=0;c<d;b++){}"
+                       ),
 
                        // Token separation
                        array( "x  in  y", "x in y" ),
@@ -85,16 +100,28 @@ class JavaScriptMinifierTest extends MediaWikiTestCase {
                        array( "var foo=\"\\\nblah\\\n\";", "var foo=\"\\\nblah\\\n\";" ),
 
                        // Multiline quoted string followed by string with spaces
-                       array( "var foo=\"\\\nblah\\\n\";\nvar baz = \" foo \";\n", "var foo=\"\\\nblah\\\n\";var baz=\" foo \";" ),
+                       array(
+                               "var foo=\"\\\nblah\\\n\";\nvar baz = \" foo \";\n",
+                               "var foo=\"\\\nblah\\\n\";var baz=\" foo \";"
+                       ),
 
                        // URL in quoted string ( // is not a comment)
-                       array( "aNode.setAttribute('href','http://foo.bar.org/baz');", "aNode.setAttribute('href','http://foo.bar.org/baz');" ),
+                       array(
+                               "aNode.setAttribute('href','http://foo.bar.org/baz');",
+                               "aNode.setAttribute('href','http://foo.bar.org/baz');"
+                       ),
 
                        // URL in quoted string after multiline quoted string
-                       array( "var foo=\"\\\nblah\\\n\";\naNode.setAttribute('href','http://foo.bar.org/baz');", "var foo=\"\\\nblah\\\n\";aNode.setAttribute('href','http://foo.bar.org/baz');" ),
+                       array(
+                               "var foo=\"\\\nblah\\\n\";\naNode.setAttribute('href','http://foo.bar.org/baz');",
+                               "var foo=\"\\\nblah\\\n\";aNode.setAttribute('href','http://foo.bar.org/baz');"
+                       ),
 
                        // Division vs. regex nastiness
-                       array( "alert( (10+10) / '/'.charCodeAt( 0 ) + '//' );", "alert((10+10)/'/'.charCodeAt(0)+'//');" ),
+                       array(
+                               "alert( (10+10) / '/'.charCodeAt( 0 ) + '//' );",
+                               "alert((10+10)/'/'.charCodeAt(0)+'//');"
+                       ),
                        array( "if(1)/a /g.exec('Pa ss');", "if(1)/a /g.exec('Pa ss');" ),
 
                        // newline insertion after 1000 chars: break after the "++", not before
@@ -130,7 +157,11 @@ class JavaScriptMinifierTest extends MediaWikiTestCase {
                wfRestoreWarnings();
                $parser->parse( $minified, 'minify-test.js', 1 );
 
-               $this->assertEquals( $expectedOutput, $minified, "Minified output should be in the form expected." );
+               $this->assertEquals(
+                       $expectedOutput,
+                       $minified,
+                       "Minified output should be in the form expected."
+               );
        }
 
        public static function provideBug32548() {