X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fmedia%2FExifTest.php;h=e7e95f7ed5890658bc00b6aa468075aa68ec446f;hb=99e968b5aa933a33a45216f6355f00780a0cf203;hp=045777d7715bc09585834c690db75ba9bcb40eea;hpb=67e23ec357d2265bc487bdd4b63e30fcaf5871c7;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/media/ExifTest.php b/tests/phpunit/includes/media/ExifTest.php index 045777d771..e7e95f7ed5 100644 --- a/tests/phpunit/includes/media/ExifTest.php +++ b/tests/phpunit/includes/media/ExifTest.php @@ -1,25 +1,21 @@ mediaPath = __DIR__ . '/../../data/media/'; if ( !wfDl( 'exif' ) ) { $this->markTestSkipped( "This test needs the exif extension." ); } - global $wgShowEXIF; - $this->showExif = $wgShowEXIF; - $wgShowEXIF = true; - } - public function tearDown() { - global $wgShowEXIF; - $wgShowEXIF = $this->showExif; + $this->setMwGlobals( 'wgShowEXIF', true ); } public function testGPSExtraction() { $filename = $this->mediaPath . 'exif-gps.jpg'; - $seg = JpegMetadataExtractor::segmentSplitter( $filename ); + $seg = JpegMetadataExtractor::segmentSplitter( $filename ); $exif = new Exif( $filename, $seg['byteOrder'] ); $data = $exif->getFilteredData(); $expected = array( @@ -34,7 +30,7 @@ class ExifTest extends MediaWikiTestCase { public function testUnicodeUserComment() { $filename = $this->mediaPath . 'exif-user-comment.jpg'; - $seg = JpegMetadataExtractor::segmentSplitter( $filename ); + $seg = JpegMetadataExtractor::segmentSplitter( $filename ); $exif = new Exif( $filename, $seg['byteOrder'] ); $data = $exif->getFilteredData();