Restructure Media related tests to avoid duplicated code
[lhc/web/wiklou.git] / tests / phpunit / includes / media / JpegTest.php
index b261137..c856b1c 100644 (file)
@@ -2,29 +2,14 @@
 /**
  * @covers JpegHandler
  */
-class JpegTest extends MediaWikiTestCase {
-
-       protected $filePath;
+class JpegTest extends MediaWikiMediaTestCase {
 
        protected function setUp() {
                parent::setUp();
                $this->checkPHPExtension( 'exif' );
 
-               $this->filePath = __DIR__ . '/../../data/media/';
-
                $this->setMwGlobals( 'wgShowEXIF', true );
 
-               $this->backend = new FSFileBackend( array(
-                       'name' => 'localtesting',
-                       'wikiId' => wfWikiId(),
-                       'containerPaths' => array( 'data' => $this->filePath )
-               ) );
-               $this->repo = new FSRepo( array(
-                       'name' => 'temp',
-                       'url' => 'http://localhost/thumbtest',
-                       'backend' => $this->backend
-               ) );
-
                $this->handler = new JpegHandler;
        }
 
@@ -64,9 +49,4 @@ class JpegTest extends MediaWikiTestCase {
 
                $this->assertEquals( $res, $expected );
        }
-
-       private function dataFile( $name, $type ) {
-               return new UnregisteredLocalFile( false, $this->repo,
-                       "mwstore://localtesting/data/$name", $type );
-       }
 }