tests: Prefer assertSame() when comparing the integer 0
[lhc/web/wiklou.git] / tests / phpunit / includes / media / PNGMetadataExtractorTest.php
index 84deb1b..4d7ff48 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 /**
+ * @group Media
  * @covers PNGMetadataExtractor
  */
 class PNGMetadataExtractorTest extends MediaWikiTestCase {
@@ -64,24 +65,6 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $meta['Copyright']['x-default'] );
        }
 
-       /**
-        * Test extraction of pHYs tags, which can tell what the
-        * actual resolution of the image is (aka in dots per meter).
-        */
-       /*
-       public function testPngPhysTag() {
-               $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
-                       'Png-native-test.png' );
-
-               $this->assertArrayHasKey( 'text', $meta );
-               $meta = $meta['text'];
-
-               $this->assertEquals( '2835/100', $meta['XResolution'] );
-               $this->assertEquals( '2835/100', $meta['YResolution'] );
-               $this->assertEquals( 3, $meta['ResolutionUnit'] ); // 3 = cm
-       }
-       */
-
        /**
         * Given a normal static PNG, check the animation metadata returned.
         */
@@ -89,9 +72,9 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
                $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
                        'Png-native-test.png' );
 
-               $this->assertEquals( 0, $meta['frameCount'] );
+               $this->assertSame( 0, $meta['frameCount'] );
                $this->assertEquals( 1, $meta['loopCount'] );
-               $this->assertEquals( 0, $meta['duration'] );
+               $this->assertSame( 0.0, $meta['duration'] );
        }
 
        /**
@@ -104,7 +87,7 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
 
                $this->assertEquals( 20, $meta['frameCount'] );
                // Note loop count of 0 = infinity
-               $this->assertEquals( 0, $meta['loopCount'] );
+               $this->assertSame( 0, $meta['loopCount'] );
                $this->assertEquals( 1.5, $meta['duration'], '', 0.00001 );
        }