21 $res = $this->
handler->getMetadata(
null, $this->filePath .
'/README' );
32 $file = $this->
dataFile( $filename,
'image/gif' );
33 $actual = $this->
handler->isAnimatedImage( $file );
34 $this->assertEquals( $expected, $actual );
39 [
'animated.gif',
true ],
40 [
'nonanimated.gif',
false ],
51 $file = $this->
dataFile( $filename,
'image/gif' );
52 $actual = $this->
handler->getImageArea( $file, $file->getWidth(), $file->getHeight() );
53 $this->assertEquals( $expected, $actual );
58 [
'animated.gif', 5400 ],
59 [
'nonanimated.gif', 1350 ],
70 $actual = $this->
handler->isMetadataValid(
null, $metadata );
71 $this->assertEquals( $expected, $actual );
82 'a:4:{s:10:"frameCount";i:1;s:6:"looped";b:0;s:8:"duration";d:0.1000000000000000055511151231257827021181583404541015625;s:8:"metadata";a:2:{s:14:"GIFFileComment";a:1:{i:0;s:35:"GIF test file ⁕ Created with GIMP";}s:15:"_MW_GIF_VERSION";i:1;}}',
96 $file = $this->
dataFile( $filename,
'image/gif' );
97 $actual = $this->
handler->getMetadata( $file,
"$this->filePath/$filename" );
106 'a:4:{s:10:"frameCount";i:1;s:6:"looped";b:0;s:8:"duration";d:0.1000000000000000055511151231257827021181583404541015625;s:8:"metadata";a:2:{s:14:"GIFFileComment";a:1:{i:0;s:35:"GIF test file ⁕ Created with GIMP";}s:15:"_MW_GIF_VERSION";i:1;}}'
110 'a:4:{s:10:"frameCount";i:4;s:6:"looped";b:1;s:8:"duration";d:2.399999999999999911182158029987476766109466552734375;s:8:"metadata";a:5:{s:6:"Artist";s:7:"Bawolff";s:16:"ImageDescription";a:2:{s:9:"x-default";s:18:"A file to test GIF";s:5:"_type";s:4:"lang";}s:15:"SublocationDest";s:13:"The interwebs";s:14:"GIFFileComment";a:1:{i:0;s:16:"GIƒ·test·file";}s:15:"_MW_GIF_VERSION";i:1;}}'
123 $file = $this->
dataFile( $filename,
'image/gif' );
124 $actual = $this->
handler->getCommonMetaArray( $file );
125 $this->assertEquals( $expected, $actual );
130 [
'nonanimated.gif', [
131 'GIFFileComment' => [
132 'GIF test file ⁕ Created with GIMP',
135 [
'animated-xmp.gif',
137 'Artist' =>
'Bawolff',
138 'ImageDescription' => [
139 'x-default' =>
'A file to test GIF',
142 'SublocationDest' =>
'The interwebs',
159 $file = $this->
dataFile( $filename,
'image/gif' );
160 $actualLength = $file->getLength();
161 $this->assertEquals( $expectedLength, $actualLength,
'', 0.00001 );
166 [
'animated.gif', 2.4 ],
167 [
'animated-xmp.gif', 2.4 ],
168 [
'nonanimated', 0.0 ],
169 [
'Bishzilla_blink.gif', 1.4 ],