20 $userMock = $this->getMock(
'User', [
'getEditCount' ] );
21 if ( $requirement > 0 ) {
22 $userMock->expects( $this->once() )
23 ->method(
'getEditCount' )
24 ->willReturn( $editCount );
26 $userMock->expects( $this->never() )
27 ->method(
'getEditCount' );
31 if ( $editCount >= $requirement ) {
32 $this->assertContains(
35 'User must be promoted if they meet edit count requirement'
38 $this->assertNotContains(
41 'User must not be promoted if they fail edit count requirement'