filebackend: cleaned up the FileBackend constructor
[lhc/web/wiklou.git] / tests / phpunit / includes / media / ExifRotationTest.php
index f02e8b9..118dc85 100644 (file)
@@ -3,11 +3,17 @@
  * Tests related to auto rotation.
  *
  * @group medium
+ *
+ * @todo covers tags
  */
 class ExifRotationTest extends MediaWikiTestCase {
 
        protected function setUp() {
                parent::setUp();
+               if ( !extension_loaded( 'exif' ) ) {
+                       $this->markTestSkipped( "This test needs the exif extension." );
+               }
+
                $this->handler = new BitmapHandler();
                $filePath = __DIR__ . '/../../data/media';
 
@@ -18,13 +24,10 @@ class ExifRotationTest extends MediaWikiTestCase {
                        'url' => 'http://localhost/thumbtest',
                        'backend' => new FSFileBackend( array(
                                'name' => 'localtesting',
-                               'lockManager' => 'nullLockManager',
+                               'wikiId' => wfWikiId(),
                                'containerPaths' => array( 'temp-thumb' => $tmpDir, 'data' => $filePath )
                        ) )
                ) );
-               if ( !wfDl( 'exif' ) ) {
-                       $this->markTestSkipped( "This test needs the exif extension." );
-               }
 
                $this->setMwGlobals( array(
                        'wgShowEXIF' => true,
@@ -33,10 +36,9 @@ class ExifRotationTest extends MediaWikiTestCase {
        }
 
        /**
-        *
         * @dataProvider provideFiles
         */
-       function testMetadata( $name, $type, $info ) {
+       public function testMetadata( $name, $type, $info ) {
                if ( !BitmapHandler::canRotate() ) {
                        $this->markTestSkipped( "This test needs a rasterizer that can auto-rotate." );
                }
@@ -49,7 +51,7 @@ class ExifRotationTest extends MediaWikiTestCase {
         *
         * @dataProvider provideFiles
         */
-       function testRotationRendering( $name, $type, $info, $thumbs ) {
+       public function testRotationRendering( $name, $type, $info, $thumbs ) {
                if ( !BitmapHandler::canRotate() ) {
                        $this->markTestSkipped( "This test needs a rasterizer that can auto-rotate." );
                }
@@ -128,7 +130,7 @@ class ExifRotationTest extends MediaWikiTestCase {
         * Same as before, but with auto-rotation disabled.
         * @dataProvider provideFilesNoAutoRotate
         */
-       function testMetadataNoAutoRotate( $name, $type, $info ) {
+       public function testMetadataNoAutoRotate( $name, $type, $info ) {
                $this->setMwGlobals( 'wgEnableAutoRotation', false );
 
                $file = $this->dataFile( $name, $type );
@@ -140,7 +142,7 @@ class ExifRotationTest extends MediaWikiTestCase {
         *
         * @dataProvider provideFilesNoAutoRotate
         */
-       function testRotationRenderingNoAutoRotate( $name, $type, $info, $thumbs ) {
+       public function testRotationRenderingNoAutoRotate( $name, $type, $info, $thumbs ) {
                $this->setMwGlobals( 'wgEnableAutoRotation', false );
 
                foreach ( $thumbs as $size => $out ) {
@@ -208,14 +210,13 @@ class ExifRotationTest extends MediaWikiTestCase {
                );
        }
 
-
        const TEST_WIDTH = 100;
        const TEST_HEIGHT = 200;
 
        /**
         * @dataProvider provideBitmapExtractPreRotationDimensions
         */
-       function testBitmapExtractPreRotationDimensions( $rotation, $expected ) {
+       public function testBitmapExtractPreRotationDimensions( $rotation, $expected ) {
                $result = $this->handler->extractPreRotationDimensions( array(
                        'physicalWidth' => self::TEST_WIDTH,
                        'physicalHeight' => self::TEST_HEIGHT,