mediawiki-extensions-Confir.../tests/phpunit/ReCaptchaNoCaptchaAuthenticationRequestTest.php
Reedy a0feac27b0 Namespace captchas
Change-Id: I2933639f9cb50db2101c4765ce9d8f9069d253b8
2022-12-13 21:40:30 +00:00

34 lines
983 B
PHP

<?php
use MediaWiki\Auth\AuthenticationRequestTestCase;
use MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\ReCaptchaNoCaptchaAuthenticationRequest;
/**
* @covers \MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\ReCaptchaNoCaptchaAuthenticationRequest
*/
class ReCaptchaNoCaptchaAuthenticationRequestTest extends AuthenticationRequestTestCase {
public function setUp(): void {
parent::setUp();
$this->mergeMwGlobalArrayValue(
'wgAutoloadClasses',
[
'MediaWiki\\Extension\\ConfirmEdit\\ReCaptchaNoCaptcha\\ReCaptchaNoCaptchaAuthenticationRequest'
=> __DIR__ . '/../../ReCaptchaNoCaptcha/includes/ReCaptchaNoCaptchaAuthenticationRequest.php'
]
);
}
protected function getInstance( array $args = [] ) {
return new ReCaptchaNoCaptchaAuthenticationRequest();
}
public function provideLoadFromSubmission() {
return [
'no proof' => [ [], [], false ],
'normal' => [ [], [ 'captchaWord' => 'abc' ], [ 'captchaWord' => 'abc' ] ],
];
}
}