Set valid $wgRateLimits in tests

Change-Id: Iacdd1719d5f08eca91de0a35c0042ffee2136f34
This commit is contained in:
Bryan Davis 2016-10-03 23:33:27 -06:00
parent ed75533c20
commit ed9886f6fd

View file

@ -216,7 +216,14 @@ class CaptchaPreAuthenticationProviderTest extends MediaWikiTestCase {
* @dataProvider providePingLimiter * @dataProvider providePingLimiter
*/ */
public function testPingLimiter( array $attempts ) { public function testPingLimiter( array $attempts ) {
$this->mergeMwGlobalArrayValue( 'wgRateLimits', [ 'badcaptcha' => 1 ] ); $this->mergeMwGlobalArrayValue(
'wgRateLimits',
[
'badcaptcha' => [
'user' => [ 1, 1 ],
],
]
);
$provider = new CaptchaPreAuthenticationProvider(); $provider = new CaptchaPreAuthenticationProvider();
$provider->setManager( AuthManager::singleton() ); $provider->setManager( AuthManager::singleton() );
$providerAccess = TestingAccessWrapper::newFromObject( $provider ); $providerAccess = TestingAccessWrapper::newFromObject( $provider );