Merge "Update list item newline handling to follow Parsoid's model"
[lhc/web/wiklou.git] / tests / phpunit / includes / media / FormatMetadataTest.php
index 44d8f00..daaefc0 100644 (file)
@@ -1,30 +1,11 @@
 <?php
 
-class FormatMetadataTest extends MediaWikiTestCase {
-
-       /** @var FSFileBackend */
-       protected $backend;
-       /** @var FSRepo */
-       protected $repo;
+class FormatMetadataTest extends MediaWikiMediaTestCase {
 
        protected function setUp() {
                parent::setUp();
 
-               if ( !extension_loaded( 'exif' ) ) {
-                       $this->markTestSkipped( "This test needs the exif extension." );
-               }
-               $filePath = __DIR__ . '/../../data/media';
-               $this->backend = new FSFileBackend( array(
-                       'name' => 'localtesting',
-                       'wikiId' => wfWikiId(),
-                       'containerPaths' => array( 'data' => $filePath )
-               ) );
-               $this->repo = new FSRepo( array(
-                       'name' => 'temp',
-                       'url' => 'http://localhost/thumbtest',
-                       'backend' => $this->backend
-               ) );
-
+               $this->checkPHPExtension( 'exif' );
                $this->setMwGlobals( 'wgShowEXIF', true );
        }
 
@@ -53,8 +34,8 @@ class FormatMetadataTest extends MediaWikiTestCase {
        }
 
        /**
-        * @param $filename String
-        * @param $expected Integer Total image area
+        * @param string $filename
+        * @param int $expected Total image area
         * @dataProvider provideFlattenArray
         * @covers FormatMetadata::flattenArray
         */
@@ -84,9 +65,4 @@ class FormatMetadataTest extends MediaWikiTestCase {
                        // TODO: more test cases
                );
        }
-
-       private function dataFile( $name, $type ) {
-               return new UnregisteredLocalFile( false, $this->repo,
-                       "mwstore://localtesting/data/$name", $type );
-       }
 }