Merge "Introducing pp_sortkey."
[lhc/web/wiklou.git] / tests / phpunit / includes / media / JpegTest.php
index bff64bb..b261137 100644 (file)
@@ -8,9 +8,7 @@ class JpegTest extends MediaWikiTestCase {
 
        protected function setUp() {
                parent::setUp();
-               if ( !extension_loaded( 'exif' ) ) {
-                       $this->markTestSkipped( "This test needs the exif extension." );
-               }
+               $this->checkPHPExtension( 'exif' );
 
                $this->filePath = __DIR__ . '/../../data/media/';
 
@@ -18,7 +16,7 @@ class JpegTest extends MediaWikiTestCase {
 
                $this->backend = new FSFileBackend( array(
                        'name' => 'localtesting',
-                       'lockManager' => 'nullLockManager',
+                       'wikiId' => wfWikiId(),
                        'containerPaths' => array( 'data' => $this->filePath )
                ) );
                $this->repo = new FSRepo( array(
@@ -39,7 +37,9 @@ class JpegTest extends MediaWikiTestCase {
        public function testJpegMetadataExtraction() {
                $file = $this->dataFile( 'test.jpg', 'image/jpeg' );
                $res = $this->handler->getMetadata( $file, $this->filePath . 'test.jpg' );
+               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
                $expected = 'a:7:{s:16:"ImageDescription";s:9:"Test file";s:11:"XResolution";s:4:"72/1";s:11:"YResolution";s:4:"72/1";s:14:"ResolutionUnit";i:2;s:16:"YCbCrPositioning";i:1;s:15:"JPEGFileComment";a:1:{i:0;s:17:"Created with GIMP";}s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}';
+               // @codingStandardsIgnoreEnd
 
                // Unserialize in case serialization format ever changes.
                $this->assertEquals( unserialize( $expected ), unserialize( $res ) );