Small tweaks to media handler tests
[lhc/web/wiklou.git] / tests / phpunit / includes / media / JpegTest.php
index b261137..2436e7d 100644 (file)
@@ -1,30 +1,17 @@
 <?php
+
 /**
+ * @group Media
  * @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 +51,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 );
-       }
 }