From eded6a8db82a176a78c230ccf3d62ca712619df2 Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 29 Jun 2011 13:45:57 +0000 Subject: [PATCH] Make BitmapMetadataHandlerTest incomplete if $wgShowEXIF is not set. It was throwing 'MWException: Internal error: exif_read_data not present. $wgShowEXIF may be incorrectly set or not checked by an extension.' Fixed typo in LocalSettings. --- includes/DefaultSettings.php | 2 +- tests/phpunit/includes/media/BitmapMetadataHandlerTest.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index a6c2d201de..f7e0e64155 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -354,7 +354,7 @@ $wgUseInstantCommons = false; * Requires PHP's EXIF extension: http://www.php.net/manual/en/ref.exif.php * * NOTE FOR WINDOWS USERS: - * To enable EXIF functions, add the folloing lines to the + * To enable EXIF functions, add the following lines to the * "Windows extensions" section of php.ini: * * extension=extensions/php_mbstring.dll diff --git a/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php b/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php index 7059545e77..568a6f2148 100644 --- a/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php +++ b/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php @@ -9,7 +9,11 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase { * translation (to en) where XMP should win. */ public function testMultilingualCascade() { - + global $wgShowEXIF; + if ( !$wgShowEXIF ) { + $this->markTestIncomplete( "This test needs the exif extension." ); + } + $meta = BitmapMetadataHandler::Jpeg( dirname( __FILE__ ) . '/Xmp-exif-multilingual_test.jpg' ); -- 2.20.1