From 337564f6dc2058b8f3c91e01442e579dff2cfedd Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Wed, 1 Aug 2018 18:26:41 -0700 Subject: [PATCH] Add an explicit check for correct operation to ExifRotationTest Makes debugging test failures way easier than just trying to figure out what errors a couple lines below mean. Change-Id: I8e7f6b14cef0954c72b22805eee512051a2b3c86 --- tests/phpunit/includes/media/ExifRotationTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/phpunit/includes/media/ExifRotationTest.php b/tests/phpunit/includes/media/ExifRotationTest.php index fff101f3a2..e64d4afadc 100644 --- a/tests/phpunit/includes/media/ExifRotationTest.php +++ b/tests/phpunit/includes/media/ExifRotationTest.php @@ -190,6 +190,11 @@ class ExifRotationTest extends MediaWikiMediaTestCase { $file = $this->dataFile( $name, $type ); $thumb = $file->transform( $params, File::RENDER_NOW | File::RENDER_FORCE ); + if ( $thumb->isError() ) { + /** @var MediaTransformError $thumb */ + $this->fail( $thumb->toText() ); + } + $this->assertEquals( $out[0], $thumb->getWidth(), -- 2.20.1