* @param string $filename
* @param bool $expected
* @dataProvider providerCanAnimate
+ * @covers File::canAnimateThumbIfAppropriate
*/
function testCanAnimateThumbIfAppropriate( $filename, $expected ) {
$this->setMwGlobals( 'wgMaxAnimatedGifArea', 9000 );
->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'] ) );
] ],
[ [
'supportsBucketing' => true,
- 'tmpBucketedThumbCache' => [ 1024 => '/tmp/shouldnotexist' + rand() ],
+ 'tmpBucketedThumbCache' => [ 1024 => '/tmp/shouldnotexist' . rand() ],
'thumbnailBucket' => 1024,
'physicalWidth' => 2048,
'expectedPath' => 'fsFilePath',
'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 ) );