<?php
/**
* @todo Could use a test of extended XMP segments. Hard to find programs that
- * create example files, and creating my own in vim propbably wouldn't
+ * create example files, and creating my own in vim probably wouldn't
* serve as a very good "test". (Adobe photoshop probably creates such files
* but it costs money). The implementation of it currently in MediaWiki is based
* solely on reading the standard, without any real world test files.
* @group Media
* @covers JpegMetadataExtractor
*/
-class JpegMetadataExtractorTest extends MediaWikiTestCase {
+class JpegMetadataExtractorTest extends MediaWikiIntegrationTestCase {
protected $filePath;
$this->assertEquals( $expected, bin2hex( $res['PSIR'][0] ) );
}
+ public function testXMPExtractionNullChar() {
+ $res = JpegMetadataExtractor::segmentSplitter( $this->filePath . 'jpeg-xmp-nullchar.jpg' );
+ $expected = file_get_contents( $this->filePath . 'jpeg-xmp-psir.xmp' );
+ $this->assertEquals( $expected, $res['XMP'] );
+ }
+
public function testXMPExtractionAltAppId() {
$res = JpegMetadataExtractor::segmentSplitter( $this->filePath . 'jpeg-xmp-alt.jpg' );
$expected = file_get_contents( $this->filePath . 'jpeg-xmp-psir.xmp' );