Clean up some PHPUnit 4 bc stuff

Bug: T192167
Change-Id: I5b08e479329503ee651580005fe7347f22939ca4
This commit is contained in:
Daimona Eaytoy 2019-10-13 11:41:05 +02:00
parent be060b3d07
commit 2b81f0333f

View file

@ -52,7 +52,7 @@ class ApiCoreThankUnitTest extends MediaWikiTestCase {
public function provideDieOnBadUser() {
$testCases = [];
$mockUser = $this->getMock( 'User' );
$mockUser = $this->createMock( 'User' );
$mockUser->expects( $this->once() )
->method( 'isAnon' )
->will( $this->returnValue( true ) );
@ -63,7 +63,7 @@ class ApiCoreThankUnitTest extends MediaWikiTestCase {
'Anonymous users cannot send thanks'
];
$mockUser = $this->getMock( 'User' );
$mockUser = $this->createMock( 'User' );
$mockUser->expects( $this->once() )
->method( 'isAnon' )
->will( $this->returnValue( false ) );
@ -77,7 +77,7 @@ class ApiCoreThankUnitTest extends MediaWikiTestCase {
"You've exceeded your rate limit. Please wait some time and try again"
];
$mockUser = $this->getMock( 'User' );
$mockUser = $this->createMock( 'User' );
$mockUser->expects( $this->once() )
->method( 'isAnon' )
->will( $this->returnValue( false ) );
@ -99,7 +99,7 @@ class ApiCoreThankUnitTest extends MediaWikiTestCase {
'You have been blocked from editing'
];
$mockUser = $this->getMock( 'User' );
$mockUser = $this->createMock( 'User' );
$mockUser->expects( $this->once() )
->method( 'getBlock' )
->will( $this->returnValue(
@ -112,7 +112,7 @@ class ApiCoreThankUnitTest extends MediaWikiTestCase {
'You have been blocked from editing'
];
$mockUser = $this->getMock( 'User' );
$mockUser = $this->createMock( 'User' );
$mockUser->expects( $this->once() )
->method( 'getBlock' )
->will( $this->returnValue(