r92637 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92636‎ | r92637 | r92638 >
Date:15:30, 20 July 2011
Author:platonides
Status:ok
Tags:
Comment:
Follow up r92635.
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/media/TiffTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/media/TiffTest.php
@@ -1,18 +1,28 @@
22 <?php
33 class TiffTest extends MediaWikiTestCase {
44
 5+ public function setUp() {
 6+ global $wgShowEXIF;
 7+ $this->showExif = $wgShowEXIF;
 8+ $wgShowEXIF = true;
 9+ }
 10+
 11+ public function tearDown() {
 12+ global $wgShowEXIF;
 13+ $wgShowEXIF = $this->showExif;
 14+ }
 15+
516 public function testInvalidFile() {
6 - global $wgShowEXIF;
7 - if ( !$wgShowEXIF ) {
 17+ if ( !wfDl( 'exif' ) ) {
818 $this->markTestIncomplete( "This test needs the exif extension." );
919 }
1020 $tiff = new TiffHandler;
1121 $res = $tiff->getMetadata( null, dirname( __FILE__ ) . '/README' );
1222 $this->assertEquals( ExifBitmapHandler::BROKEN_FILE, $res );
1323 }
 24+
1425 public function testTiffFile() {
15 - global $wgShowEXIF;
16 - if ( !$wgShowEXIF ) {
 26+ if ( !wfDl( 'exif' ) ) {
1727 $this->markTestIncomplete( "This test needs the exif extension." );
1828 }
1929 $tiff = new TiffHandler;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92635I like better checking for the actual extension, loading if needed (and able).platonides15:24, 20 July 2011

Status & tagging log