From 132bce381951b3ac3ee604242d7c936afdf38341 Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 20 Jul 2011 15:30:57 +0000 Subject: [PATCH] Follow up r92635. --- tests/phpunit/includes/media/TiffTest.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/includes/media/TiffTest.php b/tests/phpunit/includes/media/TiffTest.php index 8081ebf8be..fc191ec407 100644 --- a/tests/phpunit/includes/media/TiffTest.php +++ b/tests/phpunit/includes/media/TiffTest.php @@ -1,18 +1,28 @@ showExif = $wgShowEXIF; + $wgShowEXIF = true; + } + + public function tearDown() { + global $wgShowEXIF; + $wgShowEXIF = $this->showExif; + } + + public function testInvalidFile() { + if ( !wfDl( 'exif' ) ) { $this->markTestIncomplete( "This test needs the exif extension." ); } $tiff = new TiffHandler; $res = $tiff->getMetadata( null, dirname( __FILE__ ) . '/README' ); $this->assertEquals( ExifBitmapHandler::BROKEN_FILE, $res ); } + public function testTiffFile() { - global $wgShowEXIF; - if ( !$wgShowEXIF ) { + if ( !wfDl( 'exif' ) ) { $this->markTestIncomplete( "This test needs the exif extension." ); } $tiff = new TiffHandler; -- 2.20.1