Merge "Change .tocnumber to use grey text for section numbers in Table of Contents...
[lhc/web/wiklou.git] / tests / phpunit / includes / media / ExifBitmapTest.php
index 078c842..f70b42d 100644 (file)
@@ -82,10 +82,10 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
         * @covers ExifBitmapHandler::convertMetadataVersion
         */
        public function testConvertMetadataLatest() {
-               $metadata = array(
-                       'foo' => array( 'First', 'Second', '_type' => 'ol' ),
+               $metadata = [
+                       'foo' => [ 'First', 'Second', '_type' => 'ol' ],
                        'MEDIAWIKI_EXIF_VERSION' => 2
-               );
+               ];
                $res = $this->handler->convertMetadataVersion( $metadata, 2 );
                $this->assertEquals( $metadata, $res );
        }
@@ -94,20 +94,20 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
         * @covers ExifBitmapHandler::convertMetadataVersion
         */
        public function testConvertMetadataToOld() {
-               $metadata = array(
-                       'foo' => array( 'First', 'Second', '_type' => 'ol' ),
-                       'bar' => array( 'First', 'Second', '_type' => 'ul' ),
-                       'baz' => array( 'First', 'Second' ),
+               $metadata = [
+                       'foo' => [ 'First', 'Second', '_type' => 'ol' ],
+                       'bar' => [ 'First', 'Second', '_type' => 'ul' ],
+                       'baz' => [ 'First', 'Second' ],
                        'fred' => 'Single',
                        'MEDIAWIKI_EXIF_VERSION' => 2,
-               );
-               $expected = array(
+               ];
+               $expected = [
                        'foo' => "\n#First\n#Second",
                        'bar' => "\n*First\n*Second",
                        'baz' => "\n*First\n*Second",
                        'fred' => 'Single',
                        'MEDIAWIKI_EXIF_VERSION' => 1,
-               );
+               ];
                $res = $this->handler->convertMetadataVersion( $metadata, 1 );
                $this->assertEquals( $expected, $res );
        }
@@ -116,14 +116,14 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
         * @covers ExifBitmapHandler::convertMetadataVersion
         */
        public function testConvertMetadataSoftware() {
-               $metadata = array(
-                       'Software' => array( array( 'GIMP', '1.1' ) ),
+               $metadata = [
+                       'Software' => [ [ 'GIMP', '1.1' ] ],
                        'MEDIAWIKI_EXIF_VERSION' => 2,
-               );
-               $expected = array(
+               ];
+               $expected = [
                        'Software' => 'GIMP (Version 1.1)',
                        'MEDIAWIKI_EXIF_VERSION' => 1,
-               );
+               ];
                $res = $this->handler->convertMetadataVersion( $metadata, 1 );
                $this->assertEquals( $expected, $res );
        }
@@ -132,21 +132,21 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
         * @covers ExifBitmapHandler::convertMetadataVersion
         */
        public function testConvertMetadataSoftwareNormal() {
-               $metadata = array(
-                       'Software' => array( "GIMP 1.2", "vim" ),
+               $metadata = [
+                       'Software' => [ "GIMP 1.2", "vim" ],
                        'MEDIAWIKI_EXIF_VERSION' => 2,
-               );
-               $expected = array(
+               ];
+               $expected = [
                        'Software' => "\n*GIMP 1.2\n*vim",
                        'MEDIAWIKI_EXIF_VERSION' => 1,
-               );
+               ];
                $res = $this->handler->convertMetadataVersion( $metadata, 1 );
                $this->assertEquals( $expected, $res );
        }
 
        /**
         * @dataProvider provideSwappingICCProfile
-        * @covers BitmapHandler::swapICCProfile
+        * @covers ExifBitmapHandler::swapICCProfile
         */
        public function testSwappingICCProfile(
                $sourceFilename, $controlFilename, $newProfileFilename, $oldProfileName
@@ -176,28 +176,28 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
        }
 
        public function provideSwappingICCProfile() {
-               return array(
+               return [
                        // File with sRGB should end up with TinyRGB
-                       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'
-                       ),
+                       ],
                        // File with no profile should be left unchanged
-                       array(
+                       [
                                'test.jpg',
                                'test.jpg',
                                'tinyrgb.icc',
                                'IEC 61966-2.1 Default RGB colour space - sRGB'
-                       )
-               );
+                       ]
+               ];
        }
 }