Merge "(bug 17602) fix Monobook action tabs not quite touching the page body"
[lhc/web/wiklou.git] / tests / phpunit / includes / media / JpegTest.php
index ea007f9..05d3661 100644 (file)
@@ -1,18 +1,15 @@
 <?php
 class JpegTest extends MediaWikiTestCase {
 
-       public function setUp() {
+       protected function setUp() {
+               parent::setUp();
+
                $this->filePath = __DIR__ . '/../../data/media/';
                if ( !wfDl( 'exif' ) ) {
                        $this->markTestSkipped( "This test needs the exif extension." );
                }
-               global $wgShowEXIF;
-               $this->show = $wgShowEXIF;
-               $wgShowEXIF = true;
-       }
-       public function tearDown() {
-               global $wgShowEXIF;
-               $wgShowEXIF = $this->show;
+
+               $this->setMwGlobals( 'wgShowEXIF', true );
        }
 
        public function testInvalidFile() {
@@ -20,6 +17,7 @@ class JpegTest extends MediaWikiTestCase {
                $res = $jpeg->getMetadata( null, $this->filePath . 'README' );
                $this->assertEquals( ExifBitmapHandler::BROKEN_FILE, $res );
        }
+
        public function testJpegMetadataExtraction() {
                $h = new JpegHandler;
                $res = $h->getMetadata( null, $this->filePath . 'test.jpg' );