23 $userMock = $this->
getMock( User::class, [
'getEditCount' ] );
24 if ( $requirement > 0 ) {
25 $userMock->expects( $this->
once() )
26 ->method(
'getEditCount' )
27 ->willReturn( $editCount );
29 $userMock->expects( $this->never() )
30 ->method(
'getEditCount' );
34 if ( $editCount >= $requirement ) {
38 'User must be promoted if they meet edit count requirement'
44 'User must not be promoted if they fail edit count requirement'
51 'user with sufficient editcount' => [ 100, 10 ],
52 'user with insufficient editcount' => [ 4, 10 ],
53 'edit count requirement set to 0' => [ 1, 0 ],
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy