* @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'] ) );
'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 ) );