6 class SvgTest
extends MediaWikiMediaTestCase
{
8 protected function setUp() {
11 $this->filePath
= __DIR__
. '/../../data/media/';
13 $this->setMwGlobals( 'wgShowEXIF', true );
15 $this->handler
= new SvgHandler
;
19 * @param string $filename
20 * @param array $expected The expected independent metadata
21 * @dataProvider providerGetIndependentMetaArray
22 * @covers SvgHandler::getCommonMetaArray
24 public function testGetIndependentMetaArray( $filename, $expected ) {
25 $file = $this->dataFile( $filename, 'image/svg+xml' );
26 $res = $this->handler
->getCommonMetaArray( $file );
28 $this->assertEquals( $res, $expected );
31 public static function providerGetIndependentMetaArray() {
34 'ObjectName' => 'Tux',
36 'For more information see: http://commons.wikimedia.org/wiki/Image:Tux.svg',
38 [ 'Wikimedia-logo.svg', [] ]