X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fmedia%2FDjVuTest.php;h=76cefe5537704de07493d860ea3cb888cdf4e4f3;hb=6beee2535f37e71588fc360cc48eae6735e390df;hp=5657a5ac4ff82c6bf82e64f1add7043c041eae0f;hpb=c4957b93a4b175e64c199781ea7aae6cd0cf8a3f;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/media/DjVuTest.php b/tests/phpunit/includes/media/DjVuTest.php index 5657a5ac4f..76cefe5537 100644 --- a/tests/phpunit/includes/media/DjVuTest.php +++ b/tests/phpunit/includes/media/DjVuTest.php @@ -2,17 +2,7 @@ /** * @covers DjVuHandler */ -class DjVuTest extends MediaWikiTestCase { - - /** - * @var string the directory where test files are - */ - protected $filePath; - - /** - * @var FSRepo the repository to use - */ - protected $repo; +class DjVuTest extends MediaWikiMediaTestCase { /** * @var DjVuHandler @@ -26,35 +16,13 @@ class DjVuTest extends MediaWikiTestCase { $djvuSupport = new DjVuSupport(); if ( !$djvuSupport->isEnabled() ) { - $this->markTestSkipped( 'This test needs the installation of the ddjvu, djvutoxml and djvudump tools' ); + $this->markTestSkipped( + 'This test needs the installation of the ddjvu, djvutoxml and djvudump tools' ); } - //file repo setup - $this->filePath = __DIR__ . '/../../data/media/'; - $backend = new FSFileBackend( array( - 'name' => 'localtesting', - 'wikiId' => wfWikiId(), - 'lockManager' => new NullLockManager( array() ), - 'containerPaths' => array( 'data' => $this->filePath ) - ) ); - $this->repo = new FSRepo( array( - 'name' => 'temp', - 'url' => 'http://localhost/thumbtest', - 'backend' => $backend - ) ); - $this->handler = new DjVuHandler(); } - protected function dataFile( $name, $type ) { - return new UnregisteredLocalFile( - false, - $this->repo, - 'mwstore://localtesting/data/' . $name, - $type - ); - } - public function testGetImageSize() { $this->assertArrayEquals( array( 2480, 3508, 'DjVu', 'width="2480" height="3508"' ),