Make BitmapMetadataHandlerTest incomplete if $wgShowEXIF is not set.
authorPlatonides <platonides@users.mediawiki.org>
Wed, 29 Jun 2011 13:45:57 +0000 (13:45 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Wed, 29 Jun 2011 13:45:57 +0000 (13:45 +0000)
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
tests/phpunit/includes/media/BitmapMetadataHandlerTest.php

index a6c2d20..f7e0e64 100644 (file)
@@ -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
index 7059545..568a6f2 100644 (file)
@@ -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' );