Partial revert of broken test changes from r92246 -- for some reason it was trying...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 20 Sep 2011 19:13:52 +0000 (19:13 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 20 Sep 2011 19:13:52 +0000 (19:13 +0000)
tests/phpunit/includes/media/ExifRotationTest.php

index ea2b983..74f5390 100644 (file)
@@ -26,32 +26,9 @@ class ExifRotationTest extends MediaWikiTestCase {
         * @dataProvider providerFiles
         */
        function testMetadata( $name, $type, $info ) {
-               # Force client side resizing
-               $params = array( 'width' => 10000, 'height' => 10000 );
                $file = UnregisteredLocalFile::newFromPath( $this->filePath . $name, $type );
-               
-               # Normalize parameters
-               $this->assertTrue( $this->handler->normaliseParams( $file, $params ) );
-               $rotation = $this->handler->getRotation( $file );
-               
-               # Check if pre-rotation dimensions are still good
-               list( $width, $height ) = $this->handler->extractPreRotationDimensions( $params, $rotation );
-               $this->assertEquals( $file->getWidth(), $width, 
-                       "$name: pre-rotation width check, $rotation:$width" );
-               $this->assertEquals( $file->getHeight(), $height, 
-                       "$name: pre-rotation height check, $rotation" );
-               
-               # Any further test require a scaler that can rotate
-               if ( !BitmapHandler::canRotate() ) {
-                       $this->markTestSkipped( 'Scaler does not support rotation' );
-                       return;
-               }
-               
-               # Check post-rotation width
-               $this->assertEquals( $params['physicalWidth'], $info['width'], 
-                       "$name: post-rotation width check" );
-               $this->assertEquals( $params['physicalHeight'], $info['height'], 
-                       "$name: post-rotation height check" );
+               $this->assertEquals( $file->getWidth(), $info['width'], "$name: width check" );
+               $this->assertEquals( $file->getHeight(), $info['height'], "$name: height check" );
        }
 
        function providerFiles() {