* @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 ) ) {
$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'
+ )
);
}
}
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'
+ ),
),
);
}