X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Ffilerepo%2Ffile%2FFileTest.php;h=62e102652d79ada390a286f3824df153c8bc77c9;hp=c5fd369f1477bac726fb1e4393109d7d084499c8;hb=a620ccb99ce905d8d8afd51fce2bdb7647cad958;hpb=6fa889309d6dde3bcfd1c5f939e317abf0f3e790 diff --git a/tests/phpunit/includes/filerepo/file/FileTest.php b/tests/phpunit/includes/filerepo/file/FileTest.php index c5fd369f14..62e102652d 100644 --- a/tests/phpunit/includes/filerepo/file/FileTest.php +++ b/tests/phpunit/includes/filerepo/file/FileTest.php @@ -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 ) );