BitmapMetadataHandlerTest: Don't reinvent $this->checkPHPExtension()
authorKunal Mehta <legoktm@member.fsf.org>
Fri, 28 Sep 2018 05:01:28 +0000 (22:01 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Fri, 28 Sep 2018 05:01:28 +0000 (22:01 -0700)
Change-Id: I4957ca1be698844bafbf8de64af450cb884ec71a

tests/phpunit/includes/media/BitmapMetadataHandlerTest.php

index a70c005..83554d2 100644 (file)
@@ -127,9 +127,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 = [