From d4d15843f3fe4e8d2ed9cd5b904616d58a0e8d3c Mon Sep 17 00:00:00 2001 From: umherirrender Date: Thu, 17 Jul 2014 12:57:07 +0200 Subject: [PATCH] Merge two FileTest.php files The correct folder is /file not /files Follow-Up: Id03e1a0e1c151d3c575a695a42c54b709187d10a Change-Id: If3d896aa792e77ba8198b8eb8ad2d874e52584fb --- .../includes/filerepo/file/FileTest.php | 30 +++++++++++++++- .../includes/filerepo/files/FileTest.php | 34 ------------------- 2 files changed, 29 insertions(+), 35 deletions(-) delete mode 100644 tests/phpunit/includes/filerepo/files/FileTest.php diff --git a/tests/phpunit/includes/filerepo/file/FileTest.php b/tests/phpunit/includes/filerepo/file/FileTest.php index 9232ce40d8..9af35fbe2a 100644 --- a/tests/phpunit/includes/filerepo/file/FileTest.php +++ b/tests/phpunit/includes/filerepo/file/FileTest.php @@ -1,6 +1,34 @@ setMwGlobals( 'wgMaxAnimatedGifArea', 9000 ); + $file = $this->dataFile( $filename ); + $this->assertEquals( $file->canAnimateThumbIfAppropriate(), $expected ); + } + + function providerCanAnimate() { + return array( + array( 'nonanimated.gif', true ), + array( 'jpeg-comment-utf.jpg', true ), + array( 'test.tiff', true ), + array( 'Animated_PNG_example_bouncing_beach_ball.png', false ), + array( 'greyscale-png.png', true ), + array( 'Toll_Texas_1.svg', true ), + array( 'LoremIpsum.djvu', true ), + array( '80x60-2layers.xcf', true ), + array( 'Soccer_ball_animated.svg', false ), + array( 'Bishzilla_blink.gif', false ), + array( 'animated.gif', true ), + ); + } + /** * @dataProvider getThumbnailBucketProvider * @covers File::getThumbnailBucket diff --git a/tests/phpunit/includes/filerepo/files/FileTest.php b/tests/phpunit/includes/filerepo/files/FileTest.php deleted file mode 100644 index 36b95ea016..0000000000 --- a/tests/phpunit/includes/filerepo/files/FileTest.php +++ /dev/null @@ -1,34 +0,0 @@ -setMWGlobals( 'wgMaxAnimatedGifArea', 9000 ); - parent::setUp(); - } - - /** - * @param $filename String - * @param $expected boolean - * @dataProvider providerCanAnimate - */ - function testCanAnimateThumbIfAppropriate( $filename, $expected ) { - $file = $this->dataFile( $filename ); - $this->assertEquals( $file->canAnimateThumbIfAppropriate(), $expected ); - } - - function providerCanAnimate() { - return array( - array( 'nonanimated.gif', true ), - array( 'jpeg-comment-utf.jpg', true ), - array( 'test.tiff', true ), - array( 'Animated_PNG_example_bouncing_beach_ball.png', false ), - array( 'greyscale-png.png', true ), - array( 'Toll_Texas_1.svg', true ), - array( 'LoremIpsum.djvu', true ), - array( '80x60-2layers.xcf', true ), - array( 'Soccer_ball_animated.svg', false ), - array( 'Bishzilla_blink.gif', false ), - array( 'animated.gif', true ), - ); - } -} -- 2.20.1