* @covers MediaWiki\Auth\Throttler
*/
class ThrottlerTest extends \MediaWikiTestCase {
- protected function setUp() {
- global $wgDisableAuthManager;
-
- parent::setUp();
- if ( $wgDisableAuthManager ) {
- $this->markTestSkipped( '$wgDisableAuthManager is set' );
- }
- }
-
public function testConstructor() {
$cache = new \HashBagOStuff();
$logger = $this->getMockBuilder( AbstractLogger::class )
->setMethods( [ 'log' ] )
->getMockForAbstractClass();
$logger->expects( $this->once() )->method( 'log' )->with( $this->anything(), $this->anything(), [
- 'type' => 'custom',
+ 'throttle' => 'custom',
'index' => 0,
'ip' => '1.2.3.4',
'username' => 'SomeUser',