From: Brion Vibber Date: Tue, 20 Sep 2011 19:13:52 +0000 (+0000) Subject: Partial revert of broken test changes from r92246 -- for some reason it was trying... X-Git-Tag: 1.31.0-rc.0~27524 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=7e80ef1467c770fe0d10087abbb6ec35567ce7ae;p=lhc%2Fweb%2Fwiklou.git Partial revert of broken test changes from r92246 -- for some reason it was trying to test some random handler parameter normalization instead of the actual reported width/height! Confirms that returned width/height are incorrect for exif-rotated images. --- diff --git a/tests/phpunit/includes/media/ExifRotationTest.php b/tests/phpunit/includes/media/ExifRotationTest.php index ea2b9831b6..74f5390cde 100644 --- a/tests/phpunit/includes/media/ExifRotationTest.php +++ b/tests/phpunit/includes/media/ExifRotationTest.php @@ -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() {