public function testCreateForUser() {
/** @var PHPUnit_Framework_MockObject_MockObject|User $user */
- $user = $this->getMock( User::class, [ 'getStubThreshold' ] );
+ $user = $this->getMockBuilder( User::class )
+ ->setMethods( [ 'getStubThreshold' ] )->getMock();
$user->expects( $this->once() )
->method( 'getStubThreshold' )
->willReturn( 15 );