2 class FileTest
extends MediaWikiMediaTestCase
{
5 $this->setMWGlobals( 'wgMaxAnimatedGifArea', 9000 );
10 * @param $filename String
11 * @param $expected boolean
12 * @dataProvider providerCanAnimate
14 function testCanAnimateThumbIfAppropriate( $filename, $expected ) {
15 $file = $this->dataFile( $filename );
16 $this->assertEquals( $file->canAnimateThumbIfAppropriate(), $expected );
19 function providerCanAnimate() {
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 ),