Support offsets in prefix searching
[mediawiki.git] / tests / phpunit / includes / media / SVGTest.php
blob8f7a0d695ace63aef4926ed1d532373344dd159f
1 <?php
3 /**
4 * @group Media
5 */
6 class SvgTest extends MediaWikiMediaTestCase {
8 protected function setUp() {
9 parent::setUp();
11 $this->filePath = __DIR__ . '/../../data/media/';
13 $this->setMwGlobals( 'wgShowEXIF', true );
15 $this->handler = new SvgHandler;
18 /**
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() {
32 return array(
33 array( 'Tux.svg', array(
34 'ObjectName' => 'Tux',
35 'ImageDescription' =>
36 'For more information see: http://commons.wikimedia.org/wiki/Image:Tux.svg',
37 ) ),
38 array( 'Wikimedia-logo.svg', array() )