<?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 );
}
}
/**
- * @param $filename String
- * @param $expected Integer Total image area
+ * @param string $filename
+ * @param int $expected Total image area
* @dataProvider provideFlattenArray
* @covers FormatMetadata::flattenArray
*/
// TODO: more test cases
);
}
-
- private function dataFile( $name, $type ) {
- return new UnregisteredLocalFile( false, $this->repo,
- "mwstore://localtesting/data/$name", $type );
- }
}