Go to the documentation of this file.
10 protected function setUp() {
40 $res = $this->handler->isMetadataValid(
null,
'Something Invalid Here.' );
48 $meta =
'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}';
49 $res = $this->handler->isMetadataValid(
null, $meta );
57 $meta =
'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:1;}';
58 $res = $this->handler->isMetadataValid(
null, $meta );
67 $meta =
'a:6:{s:9:"page_data";a:1:{i:1;a:5:{s:5:"width";i:643;s:6:"height";i:448;s:5:"alpha";s:4:"true";s:4:"page";i:1;s:6:"pixels";i:288064;}}s:10:"page_count";i:1;s:10:"first_page";i:1;s:9:"last_page";i:1;s:4:"exif";a:9:{s:10:"ImageWidth";i:643;s:11:"ImageLength";i:448;s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:4;s:12:"RowsPerStrip";i:50;s:19:"PlanarConfiguration";i:1;s:22:"MEDIAWIKI_EXIF_VERSION";i:1;}s:21:"TIFF_METADATA_VERSION";s:3:"1.4";}';
68 $res = $this->handler->isMetadataValid(
null, $meta );
77 'foo' =>
array(
'First',
'Second',
'_type' =>
'ol' ),
78 'MEDIAWIKI_EXIF_VERSION' => 2
80 $res = $this->handler->convertMetadataVersion( $metadata, 2 );
81 $this->assertEquals( $metadata,
$res );
89 'foo' =>
array(
'First',
'Second',
'_type' =>
'ol' ),
90 'bar' =>
array(
'First',
'Second',
'_type' =>
'ul' ),
91 'baz' =>
array(
'First',
'Second' ),
93 'MEDIAWIKI_EXIF_VERSION' => 2,
96 'foo' =>
"\n#First\n#Second",
97 'bar' =>
"\n*First\n*Second",
98 'baz' =>
"\n*First\n*Second",
100 'MEDIAWIKI_EXIF_VERSION' => 1,
102 $res = $this->handler->convertMetadataVersion( $metadata, 1 );
103 $this->assertEquals( $expected,
$res );
111 'Software' =>
array(
array(
'GIMP',
'1.1' ) ),
112 'MEDIAWIKI_EXIF_VERSION' => 2,
115 'Software' =>
'GIMP (Version 1.1)',
116 'MEDIAWIKI_EXIF_VERSION' => 1,
118 $res = $this->handler->convertMetadataVersion( $metadata, 1 );
119 $this->assertEquals( $expected,
$res );
127 'Software' =>
array(
"GIMP 1.2",
"vim" ),
128 'MEDIAWIKI_EXIF_VERSION' => 2,
131 'Software' =>
"\n*GIMP 1.2\n*vim",
132 'MEDIAWIKI_EXIF_VERSION' => 1,
134 $res = $this->handler->convertMetadataVersion( $metadata, 1 );
135 $this->assertEquals( $expected,
$res );
Stuff specific to JPEG and (built-in) TIFF handler.
testIsInvalid()
@covers ExifBitmapHandler::isMetadataValid
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
testIsBrokenFile()
@covers ExifBitmapHandler::isMetadataValid
testConvertMetadataSoftware()
@covers ExifBitmapHandler::convertMetadataVersion
testConvertMetadataLatest()
@covers ExifBitmapHandler::convertMetadataVersion
testConvertMetadataSoftwareNormal()
@covers ExifBitmapHandler::convertMetadataVersion
testIsOldBroken()
@covers ExifBitmapHandler::isMetadataValid
testPagedTiffHandledGracefully()
Handle metadata from paged tiff handler (gotten via instant commons) gracefully.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
testConvertMetadataToOld()
@covers ExifBitmapHandler::convertMetadataVersion
ExifBitmapHandler $handler
testIsOldGood()
@covers ExifBitmapHandler::isMetadataValid
testGoodMetadata()
@covers ExifBitmapHandler::isMetadataValid