Index: trunk/phase3/tests/phpunit/includes/media/TiffTest.php |
— | — | @@ -1,18 +1,28 @@ |
2 | 2 | <?php |
3 | 3 | class TiffTest extends MediaWikiTestCase { |
4 | 4 | |
| 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 | + |
5 | 16 | public function testInvalidFile() { |
6 | | - global $wgShowEXIF; |
7 | | - if ( !$wgShowEXIF ) { |
| 17 | + if ( !wfDl( 'exif' ) ) { |
8 | 18 | $this->markTestIncomplete( "This test needs the exif extension." ); |
9 | 19 | } |
10 | 20 | $tiff = new TiffHandler; |
11 | 21 | $res = $tiff->getMetadata( null, dirname( __FILE__ ) . '/README' ); |
12 | 22 | $this->assertEquals( ExifBitmapHandler::BROKEN_FILE, $res ); |
13 | 23 | } |
| 24 | + |
14 | 25 | public function testTiffFile() { |
15 | | - global $wgShowEXIF; |
16 | | - if ( !$wgShowEXIF ) { |
| 26 | + if ( !wfDl( 'exif' ) ) { |
17 | 27 | $this->markTestIncomplete( "This test needs the exif extension." ); |
18 | 28 | } |
19 | 29 | $tiff = new TiffHandler; |