/** * Handle metadata from paged tiff handler (gotten via instant commons) gracefully. * @covers ExifBitmapHandler::isMetadataValid */ public function testPagedTiffHandledGracefully() { // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong $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";}'; // @codingStandardsIgnoreEnd $res = $this->handler->isMetadataValid(null, $meta); $this->assertEquals(ExifBitmapHandler::METADATA_BAD, $res); }