MediaWiki  master
JpegMetadataExtractorTest Class Reference
Inheritance diagram for JpegMetadataExtractorTest:
Collaboration diagram for JpegMetadataExtractorTest:

Public Member Functions

 testBinaryCommentStripped ()
 Comment values that are non-textual (random binary junk) should not be shown. More...
 
 testExifByteOrder ()
 
 testInfiniteRead ()
 
 testInfiniteRead2 ()
 
 testIPTCHashComparisionBadHash ()
 
 testIPTCHashComparisionGoodHash ()
 
 testIPTCHashComparisionNoHash ()
 
 testIso88591Comment ()
 The file is iso-8859-1, but it should get auto converted. More...
 
 testMultipleComment ()
 
 testPSIRExtraction ()
 
 testUtf8Comment ( $file)
 We also use this test to test padding bytes don't screw stuff up. More...
 
 testXMPExtraction ()
 
 testXMPExtractionAltAppId ()
 

Static Public Member Functions

static provideUtf8Comment ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from MediaWikiUnitTestCase
 setUp ()
 
 tearDown ()
 

Protected Attributes

 $filePath
 

Detailed Description

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 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.

Media JpegMetadataExtractor

Definition at line 12 of file JpegMetadataExtractorTest.php.

Member Function Documentation

◆ provideUtf8Comment()

static JpegMetadataExtractorTest::provideUtf8Comment ( )
static

Definition at line 35 of file JpegMetadataExtractorTest.php.

◆ setUp()

JpegMetadataExtractorTest::setUp ( )
protected

Definition at line 16 of file JpegMetadataExtractorTest.php.

◆ testBinaryCommentStripped()

JpegMetadataExtractorTest::testBinaryCommentStripped ( )

Comment values that are non-textual (random binary junk) should not be shown.

The example test file has a comment with a 0x5 byte in it which is a control character and considered binary junk for our purposes.

Definition at line 53 of file JpegMetadataExtractorTest.php.

References $res, and JpegMetadataExtractor\segmentSplitter().

◆ testExifByteOrder()

JpegMetadataExtractorTest::testExifByteOrder ( )

Definition at line 106 of file JpegMetadataExtractorTest.php.

References $res, and JpegMetadataExtractor\segmentSplitter().

◆ testInfiniteRead()

JpegMetadataExtractorTest::testInfiniteRead ( )

Definition at line 112 of file JpegMetadataExtractorTest.php.

References $res, and JpegMetadataExtractor\segmentSplitter().

◆ testInfiniteRead2()

JpegMetadataExtractorTest::testInfiniteRead2 ( )

Definition at line 120 of file JpegMetadataExtractorTest.php.

References $res, and JpegMetadataExtractor\segmentSplitter().

◆ testIPTCHashComparisionBadHash()

JpegMetadataExtractorTest::testIPTCHashComparisionBadHash ( )

◆ testIPTCHashComparisionGoodHash()

JpegMetadataExtractorTest::testIPTCHashComparisionGoodHash ( )

◆ testIPTCHashComparisionNoHash()

JpegMetadataExtractorTest::testIPTCHashComparisionNoHash ( )

◆ testIso88591Comment()

JpegMetadataExtractorTest::testIso88591Comment ( )

The file is iso-8859-1, but it should get auto converted.

Definition at line 44 of file JpegMetadataExtractorTest.php.

References $res, and JpegMetadataExtractor\segmentSplitter().

◆ testMultipleComment()

JpegMetadataExtractorTest::testMultipleComment ( )

Definition at line 61 of file JpegMetadataExtractorTest.php.

References $res, and JpegMetadataExtractor\segmentSplitter().

◆ testPSIRExtraction()

JpegMetadataExtractorTest::testPSIRExtraction ( )

Definition at line 72 of file JpegMetadataExtractorTest.php.

References $res, and JpegMetadataExtractor\segmentSplitter().

◆ testUtf8Comment()

JpegMetadataExtractorTest::testUtf8Comment (   $file)

We also use this test to test padding bytes don't screw stuff up.

Parameters
string$fileFilename

provideUtf8Comment

Definition at line 30 of file JpegMetadataExtractorTest.php.

References $file, $res, and JpegMetadataExtractor\segmentSplitter().

◆ testXMPExtraction()

JpegMetadataExtractorTest::testXMPExtraction ( )

Definition at line 66 of file JpegMetadataExtractorTest.php.

References $res, and JpegMetadataExtractor\segmentSplitter().

◆ testXMPExtractionAltAppId()

JpegMetadataExtractorTest::testXMPExtractionAltAppId ( )

Definition at line 79 of file JpegMetadataExtractorTest.php.

References $res, and JpegMetadataExtractor\segmentSplitter().

Member Data Documentation

◆ $filePath

JpegMetadataExtractorTest::$filePath
protected

Definition at line 14 of file JpegMetadataExtractorTest.php.


The documentation for this class was generated from the following file: