mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
Set valid $wgRateLimits in tests
Change-Id: Iacdd1719d5f08eca91de0a35c0042ffee2136f34
This commit is contained in:
parent
ed75533c20
commit
ed9886f6fd
|
@ -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 );
|
||||||
|
|
Loading…
Reference in a new issue