Amire80 has uploaded a new change for review.

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

Change subject: Make lines short to pass phpcs in media tests PHP files
......................................................................

Make lines short to pass phpcs in media tests PHP files

Some lines that weren't too long are also broken up
for consistency and readability.

Bug: T102614
Change-Id: I36e3225e135b58bc22705afbb888b06f93b5a9a8
---
M tests/phpunit/includes/media/ExifBitmapTest.php
M tests/phpunit/includes/media/FormatMetadataTest.php
2 files changed, 61 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/45/242445/1

diff --git a/tests/phpunit/includes/media/ExifBitmapTest.php 
b/tests/phpunit/includes/media/ExifBitmapTest.php
index adbc977..078c842 100644
--- a/tests/phpunit/includes/media/ExifBitmapTest.php
+++ b/tests/phpunit/includes/media/ExifBitmapTest.php
@@ -148,7 +148,9 @@
         * @dataProvider provideSwappingICCProfile
         * @covers BitmapHandler::swapICCProfile
         */
-       public function testSwappingICCProfile( $sourceFilename, 
$controlFilename, $newProfileFilename, $oldProfileName ) {
+       public function testSwappingICCProfile(
+               $sourceFilename, $controlFilename, $newProfileFilename, 
$oldProfileName
+       ) {
                global $wgExiftool;
 
                if ( !$wgExiftool || !is_file( $wgExiftool ) ) {
@@ -167,17 +169,35 @@
                $file = $this->dataFile( $sourceFilename, 'image/jpeg' );
                $this->handler->swapICCProfile( $filepath, $oldProfileName, 
$profileFilepath );
 
-               $this->assertEquals( sha1( file_get_contents( $filepath ) ), 
sha1( file_get_contents( $controlFilepath ) ) );
+               $this->assertEquals(
+                       sha1( file_get_contents( $filepath ) ),
+                       sha1( file_get_contents( $controlFilepath ) )
+               );
        }
 
        public function provideSwappingICCProfile() {
                return array(
                        // File with sRGB should end up with TinyRGB
-                       array( 'srgb.jpg', 'tinyrgb.jpg', 'tinyrgb.icc', 'IEC 
61966-2.1 Default RGB colour space - sRGB' ),
+                       array(
+                               'srgb.jpg',
+                               'tinyrgb.jpg',
+                               'tinyrgb.icc',
+                               'IEC 61966-2.1 Default RGB colour space - sRGB'
+                       ),
                        // File with TinyRGB should be left unchanged
-                       array( 'tinyrgb.jpg', 'tinyrgb.jpg', 'tinyrgb.icc', 
'IEC 61966-2.1 Default RGB colour space - sRGB' ),
+                       array(
+                               'tinyrgb.jpg',
+                               'tinyrgb.jpg',
+                               'tinyrgb.icc',
+                               'IEC 61966-2.1 Default RGB colour space - sRGB'
+                       ),
                        // File with no profile should be left unchanged
-                       array( 'test.jpg', 'test.jpg', 'tinyrgb.icc', 'IEC 
61966-2.1 Default RGB colour space - sRGB' )
+                       array(
+                               'test.jpg',
+                               'test.jpg',
+                               'tinyrgb.icc',
+                               'IEC 61966-2.1 Default RGB colour space - sRGB'
+                       )
                );
        }
 }
diff --git a/tests/phpunit/includes/media/FormatMetadataTest.php 
b/tests/phpunit/includes/media/FormatMetadataTest.php
index b666c83..22383e1 100644
--- a/tests/phpunit/includes/media/FormatMetadataTest.php
+++ b/tests/phpunit/includes/media/FormatMetadataTest.php
@@ -53,17 +53,45 @@
 
        public function provideResolveMultivalueValue() {
                return array(
-                       'nonArray' => array( 'foo', 'foo' ),
-                       'multiValue' => array( array( 'first', 'second', 
'third', '_type' => 'ol' ), 'first' ),
-                       'noType' => array( array( 'first', 'second', 'third' ), 
'first' ),
-                       'typeFirst' => array( array( '_type' => 'ol', 'first', 
'second', 'third' ), 'first' ),
+                       'nonArray' => array(
+                               'foo',
+                               'foo'
+                       ),
+                       'multiValue' => array(
+                               array( 'first', 'second', 'third', '_type' => 
'ol' ),
+                               'first'
+                       ),
+                       'noType' => array(
+                               array( 'first', 'second', 'third' ),
+                               'first'
+                       ),
+                       'typeFirst' => array(
+                               array( '_type' => 'ol', 'first', 'second', 
'third' ),
+                               'first'
+                       ),
                        'multilang' => array(
-                               array( 'en' => 'first', 'de' => 'Erste', 
'_type' => 'lang' ),
-                               array( 'en' => 'first', 'de' => 'Erste', 
'_type' => 'lang' ),
+                               array(
+                                       'en' => 'first',
+                                       'de' => 'Erste',
+                                       '_type' => 'lang'
+                               ),
+                               array(
+                                       'en' => 'first',
+                                       'de' => 'Erste',
+                                       '_type' => 'lang'
+                               ),
                        ),
                        'multilang-multivalue' => array(
-                               array( 'en' => array( 'first', 'second' ), 'de' 
=> array( 'Erste', 'Zweite' ), '_type' => 'lang' ),
-                               array( 'en' => 'first', 'de' => 'Erste', 
'_type' => 'lang' ),
+                               array(
+                                       'en' => array( 'first', 'second' ),
+                                       'de' => array( 'Erste', 'Zweite' ),
+                                       '_type' => 'lang'
+                               ),
+                               array(
+                                       'en' => 'first',
+                                       'de' => 'Erste',
+                                       '_type' => 'lang'
+                               ),
                        ),
                );
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36e3225e135b58bc22705afbb888b06f93b5a9a8
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