Index: trunk/phase3/tests/phpunit/includes/media/JpegTest.php |
— | — | @@ -1,9 +1,10 @@ |
2 | 2 | <?php |
| 3 | +wfDl('exif'); |
| 4 | + |
3 | 5 | class JpegTest extends MediaWikiTestCase { |
4 | 6 | |
5 | 7 | public function testInvalidFile() { |
6 | | - global $wgShowEXIF; |
7 | | - if ( !$wgShowEXIF ) { |
| 8 | + if ( !wfDl( 'exif' ) ) { |
8 | 9 | $this->markTestIncomplete( "This test needs the exif extension." ); |
9 | 10 | } |
10 | 11 | $jpeg = new JpegHandler; |
— | — | @@ -11,8 +12,7 @@ |
12 | 13 | $this->assertEquals( ExifBitmapHandler::BROKEN_FILE, $res ); |
13 | 14 | } |
14 | 15 | public function testTiffFile() { |
15 | | - global $wgShowEXIF; |
16 | | - if ( !$wgShowEXIF ) { |
| 16 | + if ( !wfDl( 'exif' ) ) { |
17 | 17 | $this->markTestIncomplete( "This test needs the exif extension." ); |
18 | 18 | } |
19 | 19 | $h = new JpegHandler; |
Index: trunk/phase3/tests/phpunit/includes/media/ExifBitmapTest.php |
— | — | @@ -1,9 +1,9 @@ |
2 | 2 | <?php |
| 3 | + |
3 | 4 | class ExifBitmapTest extends MediaWikiTestCase { |
4 | 5 | |
5 | 6 | public function testIsOldBroken() { |
6 | | - global $wgShowEXIF; |
7 | | - if ( !$wgShowEXIF ) { |
| 7 | + if ( wfDl( 'exif' ) ) { |
8 | 8 | $this->markTestIncomplete( "This test needs the exif extension." ); |
9 | 9 | } |
10 | 10 | $handler = new ExifBitmapHandler; |
— | — | @@ -11,8 +11,7 @@ |
12 | 12 | $this->assertEquals( ExifBitmapHandler::METADATA_COMPATIBLE, $res ); |
13 | 13 | } |
14 | 14 | public function testIsBrokenFile() { |
15 | | - global $wgShowEXIF; |
16 | | - if ( !$wgShowEXIF ) { |
| 15 | + if ( !wfDl( 'exif' ) ) { |
17 | 16 | $this->markTestIncomplete( "This test needs the exif extension." ); |
18 | 17 | } |
19 | 18 | $handler = new ExifBitmapHandler; |
— | — | @@ -20,8 +19,7 @@ |
21 | 20 | $this->assertEquals( ExifBitmapHandler::METADATA_GOOD, $res ); |
22 | 21 | } |
23 | 22 | public function testIsInvalid() { |
24 | | - global $wgShowEXIF; |
25 | | - if ( !$wgShowEXIF ) { |
| 23 | + if ( !wfDl( 'exif' ) ) { |
26 | 24 | $this->markTestIncomplete( "This test needs the exif extension." ); |
27 | 25 | } |
28 | 26 | $handler = new ExifBitmapHandler; |
— | — | @@ -29,8 +27,7 @@ |
30 | 28 | $this->assertEquals( ExifBitmapHandler::METADATA_BAD, $res ); |
31 | 29 | } |
32 | 30 | public function testGoodMetadata() { |
33 | | - global $wgShowEXIF; |
34 | | - if ( !$wgShowEXIF ) { |
| 31 | + if ( !wfDl( 'exif' ) ) { |
35 | 32 | $this->markTestIncomplete( "This test needs the exif extension." ); |
36 | 33 | } |
37 | 34 | $handler = new ExifBitmapHandler; |
— | — | @@ -39,8 +36,7 @@ |
40 | 37 | $this->assertEquals( ExifBitmapHandler::METADATA_GOOD, $res ); |
41 | 38 | } |
42 | 39 | public function testIsOldGood() { |
43 | | - global $wgShowEXIF; |
44 | | - if ( !$wgShowEXIF ) { |
| 40 | + if ( !wfDl( 'exif' ) ) { |
45 | 41 | $this->markTestIncomplete( "This test needs the exif extension." ); |
46 | 42 | } |
47 | 43 | $handler = new ExifBitmapHandler; |
— | — | @@ -51,8 +47,7 @@ |
52 | 48 | // Handle metadata from paged tiff handler (gotten via instant commons) |
53 | 49 | // gracefully. |
54 | 50 | public function testPagedTiffHandledGracefully() { |
55 | | - global $wgShowEXIF; |
56 | | - if ( !$wgShowEXIF ) { |
| 51 | + if ( !wfDl( 'exif' ) ) { |
57 | 52 | $this->markTestIncomplete( "This test needs the exif extension." ); |
58 | 53 | } |
59 | 54 | $handler = new ExifBitmapHandler; |