diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-04-25 06:26:49 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-04-25 06:26:49 +0200 |
commit | 2e44b49a2db3026050b136de9b00f749dd3ff939 (patch) | |
tree | ef048f4db79a93c25cfc86319264aa7ae2a4ae0b /tests/phpunit/includes/media/GIFMetadataExtractorTest.php | |
parent | 9441dde8bfb95277df073717ed7817dced40f948 (diff) |
Update to MediaWiki 1.22.6
Diffstat (limited to 'tests/phpunit/includes/media/GIFMetadataExtractorTest.php')
-rw-r--r-- | tests/phpunit/includes/media/GIFMetadataExtractorTest.php | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/tests/phpunit/includes/media/GIFMetadataExtractorTest.php b/tests/phpunit/includes/media/GIFMetadataExtractorTest.php deleted file mode 100644 index 9e3f9244..00000000 --- a/tests/phpunit/includes/media/GIFMetadataExtractorTest.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php -class GIFMetadataExtractorTest extends MediaWikiTestCase { - - protected function setUp() { - parent::setUp(); - - $this->mediaPath = __DIR__ . '/../../data/media/'; - } - - /** - * Put in a file, and see if the metadata coming out is as expected. - * @param $filename String - * @param $expected Array The extracted metadata. - * @dataProvider provideGetMetadata - * @covers GIFMetadataExtractor::getMetadata - */ - public function testGetMetadata( $filename, $expected ) { - $actual = GIFMetadataExtractor::getMetadata( $this->mediaPath . $filename ); - $this->assertEquals( $expected, $actual ); - } - - public static function provideGetMetadata() { - - $xmpNugget = <<<EOF -<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?> -<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 7.30'> -<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> - - <rdf:Description rdf:about='' - xmlns:Iptc4xmpCore='http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/'> - <Iptc4xmpCore:Location>The interwebs</Iptc4xmpCore:Location> - </rdf:Description> - - <rdf:Description rdf:about='' - xmlns:tiff='http://ns.adobe.com/tiff/1.0/'> - <tiff:Artist>Bawolff</tiff:Artist> - <tiff:ImageDescription> - <rdf:Alt> - <rdf:li xml:lang='x-default'>A file to test GIF</rdf:li> - </rdf:Alt> - </tiff:ImageDescription> - </rdf:Description> -</rdf:RDF> -</x:xmpmeta> - - - - - - - - - - - - - - - - - - - - - - - - -<?xpacket end='w'?> -EOF; - $xmpNugget = str_replace( "\r", '', $xmpNugget ); // Windows compat - - return array( - array( - 'nonanimated.gif', - array( - 'comment' => array( 'GIF test file ⁕ Created with GIMP' ), - 'duration' => 0.1, - 'frameCount' => 1, - 'looped' => false, - 'xmp' => '', - ) - ), - array( - 'animated.gif', - array( - 'comment' => array( 'GIF test file . Created with GIMP' ), - 'duration' => 2.4, - 'frameCount' => 4, - 'looped' => true, - 'xmp' => '', - ) - ), - - array( - 'animated-xmp.gif', - array( - 'xmp' => $xmpNugget, - 'duration' => 2.4, - 'frameCount' => 4, - 'looped' => true, - 'comment' => array( 'GIƒ·test·file' ), - ) - ), - ); - } -} |