Fix excessive whitespace in BitmapMetadataHandlerTest.php
[lhc/web/wiklou.git] / tests / phpunit / includes / media / BitmapMetadataHandlerTest.php
index a70c005..32a6b6a 100644 (file)
@@ -77,21 +77,18 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
                $meta = BitmapMetadataHandler::Jpeg( $this->filePath .
                        'iptc-timetest.jpg' );
 
+               // raw date is 2020:07:13 14:04:05+11:32
                $this->assertEquals( '2020:07:14 01:36:05', $meta['DateTimeDigitized'] );
+               // raw date is 1997:03:02 03:01:02-03:00
                $this->assertEquals( '1997:03:02 00:01:02', $meta['DateTimeOriginal'] );
-       }
 
-       /**
-        * File has an invalid time (+ one valid but really weird time)
-        * that shouldn't be included
-        * @covers BitmapMetadataHandler::Jpeg
-        */
-       public function testIPTCDatesInvalid() {
                $meta = BitmapMetadataHandler::Jpeg( $this->filePath .
                        'iptc-timetest-invalid.jpg' );
 
+               // raw date is 1845:03:02 03:01:02-03:00
                $this->assertEquals( '1845:03:02 00:01:02', $meta['DateTimeOriginal'] );
-               $this->assertFalse( isset( $meta['DateTimeDigitized'] ) );
+               // raw date is 1942:07:13 25:05:02+00:00
+               $this->assertSame( '1942:07:14 01:05:02', $meta['DateTimeDigitized'] );
        }
 
        /**
@@ -127,9 +124,8 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
         * @covers BitmapMetadataHandler::png
         */
        public function testPNGXMP() {
-               if ( !extension_loaded( 'xml' ) ) {
-                       $this->markTestSkipped( "This test needs the xml extension." );
-               }
+               $this->checkPHPExtension( 'xml' );
+
                $handler = new BitmapMetadataHandler();
                $result = $handler->PNG( $this->filePath . 'xmp.png' );
                $expected = [