jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Umherirrender: Looks good to me, approved
Addshore: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I36e3225e135b58bc22705afbb888b06f93b5a9a8
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Polybuildr <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits