rdbms: Rename "memCache" to "memStash" in LBFactory
[mediawiki.git] / tests / phpunit / includes / media / SVGTest.php
blob4a986b4cc1bc323b96d6e7847a3519671dc233a8
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 [
33 [ 'Tux.svg', [
34 'ObjectName' => 'Tux',
35 'ImageDescription' =>
36 'For more information see: http://commons.wikimedia.org/wiki/Image:Tux.svg',
37 ] ],
38 [ 'Wikimedia-logo.svg', [] ]