* @return PHPUnit_Framework_MockObject_MockObject|User
*/
private function getMockUser( $id ) {
- $user = $this->getMock( User::class );
+ $user = $this->createMock( User::class );
$user->expects( $this->any() )
->method( 'getId' )
->will( $this->returnValue( $id ) );
$checkRights = 0;
/** @var User|PHPUnit_Framework_MockObject_MockObject $user */
- $user = $this->getMock( User::class );
+ $user = $this->createMock( User::class );
$user->expects( $this->once() )
->method( 'addWatch' )
->with( $title, $checkRights );
$checkRights = 0;
/** @var User|PHPUnit_Framework_MockObject_MockObject $user */
- $user = $this->getMock( User::class );
+ $user = $this->createMock( User::class );
$user->expects( $this->once() )
->method( 'removeWatch' )
->with( $title, $checkRights );
$checkRights = 0;
/** @var User|PHPUnit_Framework_MockObject_MockObject $user */
- $user = $this->getMock( User::class );
+ $user = $this->createMock( User::class );
$user->expects( $this->once() )
->method( 'isWatched' )
->with( $title, $checkRights )