<?php
+
class ExifBitmapTest extends MediaWikiTestCase {
public function testIsOldBroken() {
- global $wgShowEXIF;
- if ( !$wgShowEXIF ) {
+ if ( wfDl( 'exif' ) ) {
$this->markTestIncomplete( "This test needs the exif extension." );
}
$handler = new ExifBitmapHandler;
$this->assertEquals( ExifBitmapHandler::METADATA_COMPATIBLE, $res );
}
public function testIsBrokenFile() {
- global $wgShowEXIF;
- if ( !$wgShowEXIF ) {
+ if ( !wfDl( 'exif' ) ) {
$this->markTestIncomplete( "This test needs the exif extension." );
}
$handler = new ExifBitmapHandler;
$this->assertEquals( ExifBitmapHandler::METADATA_GOOD, $res );
}
public function testIsInvalid() {
- global $wgShowEXIF;
- if ( !$wgShowEXIF ) {
+ if ( !wfDl( 'exif' ) ) {
$this->markTestIncomplete( "This test needs the exif extension." );
}
$handler = new ExifBitmapHandler;
$this->assertEquals( ExifBitmapHandler::METADATA_BAD, $res );
}
public function testGoodMetadata() {
- global $wgShowEXIF;
- if ( !$wgShowEXIF ) {
+ if ( !wfDl( 'exif' ) ) {
$this->markTestIncomplete( "This test needs the exif extension." );
}
$handler = new ExifBitmapHandler;
$this->assertEquals( ExifBitmapHandler::METADATA_GOOD, $res );
}
public function testIsOldGood() {
- global $wgShowEXIF;
- if ( !$wgShowEXIF ) {
+ if ( !wfDl( 'exif' ) ) {
$this->markTestIncomplete( "This test needs the exif extension." );
}
$handler = new ExifBitmapHandler;
// Handle metadata from paged tiff handler (gotten via instant commons)
// gracefully.
public function testPagedTiffHandledGracefully() {
- global $wgShowEXIF;
- if ( !$wgShowEXIF ) {
+ if ( !wfDl( 'exif' ) ) {
$this->markTestIncomplete( "This test needs the exif extension." );
}
$handler = new ExifBitmapHandler;
<?php
+wfDl('exif');
+
class JpegTest extends MediaWikiTestCase {
public function testInvalidFile() {
- global $wgShowEXIF;
- if ( !$wgShowEXIF ) {
+ if ( !wfDl( 'exif' ) ) {
$this->markTestIncomplete( "This test needs the exif extension." );
}
$jpeg = new JpegHandler;
$this->assertEquals( ExifBitmapHandler::BROKEN_FILE, $res );
}
public function testTiffFile() {
- global $wgShowEXIF;
- if ( !$wgShowEXIF ) {
+ if ( !wfDl( 'exif' ) ) {
$this->markTestIncomplete( "This test needs the exif extension." );
}
$h = new JpegHandler;