Merge "Add semantic tags to license info text"
[lhc/web/wiklou.git] / tests / phpunit / includes / filerepo / file / FileTest.php
index c5fd369..62e1026 100644 (file)
@@ -6,6 +6,7 @@ class FileTest extends MediaWikiMediaTestCase {
         * @param string $filename
         * @param bool $expected
         * @dataProvider providerCanAnimate
+        * @covers File::canAnimateThumbIfAppropriate
         */
        function testCanAnimateThumbIfAppropriate( $filename, $expected ) {
                $this->setMwGlobals( 'wgMaxAnimatedGifArea', 9000 );
@@ -155,7 +156,8 @@ class FileTest extends MediaWikiMediaTestCase {
                        ->method( 'getLocalReference' )
                        ->will( $this->returnValue( $fsFile ) );
 
-               $handlerMock = $this->getMock( 'BitmapHandler', [ 'supportsBucketing' ] );
+               $handlerMock = $this->getMockBuilder( 'BitmapHandler' )
+                       ->setMethods( [ 'supportsBucketing' ] )->getMock();
                $handlerMock->expects( $this->any() )
                        ->method( 'supportsBucketing' )
                        ->will( $this->returnValue( $data['supportsBucketing'] ) );
@@ -206,7 +208,7 @@ class FileTest extends MediaWikiMediaTestCase {
                        ] ],
                        [ [
                                'supportsBucketing' => true,
-                               'tmpBucketedThumbCache' => [ 1024 => '/tmp/shouldnotexist' + rand() ],
+                               'tmpBucketedThumbCache' => [ 1024 => '/tmp/shouldnotexist' . rand() ],
                                'thumbnailBucket' => 1024,
                                'physicalWidth' => 2048,
                                'expectedPath' => 'fsFilePath',
@@ -261,7 +263,8 @@ class FileTest extends MediaWikiMediaTestCase {
                                'generateAndSaveThumb', 'getHandler' ] )
                        ->getMockForAbstractClass();
 
-               $handlerMock = $this->getMock( 'JpegHandler', [ 'supportsBucketing' ] );
+               $handlerMock = $this->getMockBuilder( 'JpegHandler' )
+                       ->setMethods( [ 'supportsBucketing' ] )->getMock();
                $handlerMock->expects( $this->any() )
                        ->method( 'supportsBucketing' )
                        ->will( $this->returnValue( true ) );