Support for enabling skins in the installer
[lhc/web/wiklou.git] / tests / phpunit / includes / filerepo / files / FileTest.php
1 <?php
2 class FileTest extends MediaWikiMediaTestCase {
3
4 function setUp() {
5 $this->setMWGlobals( 'wgMaxAnimatedGifArea', 9000 );
6 parent::setUp();
7 }
8
9 /**
10 * @param $filename String
11 * @param $expected boolean
12 * @dataProvider providerCanAnimate
13 */
14 function testCanAnimateThumbIfAppropriate( $filename, $expected ) {
15 $file = $this->dataFile( $filename );
16 $this->assertEquals( $file->canAnimateThumbIfAppropriate(), $expected );
17 }
18
19 function providerCanAnimate() {
20 return array(
21 array( 'nonanimated.gif', true ),
22 array( 'jpeg-comment-utf.jpg', true ),
23 array( 'test.tiff', true ),
24 array( 'Animated_PNG_example_bouncing_beach_ball.png', false ),
25 array( 'greyscale-png.png', true ),
26 array( 'Toll_Texas_1.svg', true ),
27 array( 'LoremIpsum.djvu', true ),
28 array( '80x60-2layers.xcf', true ),
29 array( 'Soccer_ball_animated.svg', false ),
30 array( 'Bishzilla_blink.gif', false ),
31 array( 'animated.gif', true ),
32 );
33 }
34 }