http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97651
Revision: 97651
Author: brion
Date: 2011-09-20 19:13:52 +0000 (Tue, 20 Sep 2011)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/phase3/tests/phpunit/includes/media/ExifRotationTest.php
Modified: trunk/phase3/tests/phpunit/includes/media/ExifRotationTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/media/ExifRotationTest.php
2011-09-20 19:13:36 UTC (rev 97650)
+++ trunk/phase3/tests/phpunit/includes/media/ExifRotationTest.php
2011-09-20 19:13:52 UTC (rev 97651)
@@ -26,32 +26,9 @@
* @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() {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs