MediaWiki
REL1_24
|
00001 <?php 00002 00006 class SvgTest extends MediaWikiMediaTestCase { 00007 00008 protected function setUp() { 00009 parent::setUp(); 00010 00011 $this->filePath = __DIR__ . '/../../data/media/'; 00012 00013 $this->setMwGlobals( 'wgShowEXIF', true ); 00014 00015 $this->handler = new SvgHandler; 00016 } 00017 00024 public function testGetIndependentMetaArray( $filename, $expected ) { 00025 $file = $this->dataFile( $filename, 'image/svg+xml' ); 00026 $res = $this->handler->getCommonMetaArray( $file ); 00027 00028 $this->assertEquals( $res, $expected ); 00029 } 00030 00031 public static function providerGetIndependentMetaArray() { 00032 return array( 00033 array( 'Tux.svg', array( 00034 'ObjectName' => 'Tux', 00035 'ImageDescription' => 00036 'For more information see: http://commons.wikimedia.org/wiki/Image:Tux.svg', 00037 ) ), 00038 array( 'Wikimedia-logo.svg', array() ) 00039 ); 00040 } 00041 }