X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fmedia%2FJpegMetadataExtractorTest.php;h=0991254119cbf761c8e73fe314fae3257848e5aa;hb=f3293a45ee0fe0dda4053d0071cc46d6cca906e4;hp=7c977d5a45bcfda5d14529282287a8a611f00616;hpb=3d1972cc07b23a4750a50780d8912d24baa44cd5;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/media/JpegMetadataExtractorTest.php b/tests/phpunit/includes/media/JpegMetadataExtractorTest.php index 7c977d5a45..0991254119 100644 --- a/tests/phpunit/includes/media/JpegMetadataExtractorTest.php +++ b/tests/phpunit/includes/media/JpegMetadataExtractorTest.php @@ -29,21 +29,21 @@ class JpegMetadataExtractorTest extends MediaWikiTestCase { */ public function testUtf8Comment( $file ) { $res = JpegMetadataExtractor::segmentSplitter( $this->filePath . $file ); - $this->assertEquals( array( 'UTF-8 JPEG Comment — ¼' ), $res['COM'] ); + $this->assertEquals( [ 'UTF-8 JPEG Comment — ¼' ], $res['COM'] ); } public static function provideUtf8Comment() { - return array( - array( 'jpeg-comment-utf.jpg' ), - array( 'jpeg-padding-even.jpg' ), - array( 'jpeg-padding-odd.jpg' ), - ); + return [ + [ 'jpeg-comment-utf.jpg' ], + [ 'jpeg-padding-even.jpg' ], + [ 'jpeg-padding-odd.jpg' ], + ]; } /** The file is iso-8859-1, but it should get auto converted */ public function testIso88591Comment() { $res = JpegMetadataExtractor::segmentSplitter( $this->filePath . 'jpeg-comment-iso8859-1.jpg' ); - $this->assertEquals( array( 'ISO-8859-1 JPEG Comment - ¼' ), $res['COM'] ); + $this->assertEquals( [ 'ISO-8859-1 JPEG Comment - ¼' ], $res['COM'] ); } /** Comment values that are non-textual (random binary junk) should not be shown. @@ -60,7 +60,7 @@ class JpegMetadataExtractorTest extends MediaWikiTestCase { */ public function testMultipleComment() { $res = JpegMetadataExtractor::segmentSplitter( $this->filePath . 'jpeg-comment-multiple.jpg' ); - $this->assertEquals( array( 'foo', 'bar' ), $res['COM'] ); + $this->assertEquals( [ 'foo', 'bar' ], $res['COM'] ); } public function testXMPExtraction() {