mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-27 17:40:11 +00:00
9f2e976f10
In an attempt to be able to have easier code coverage... Bug: T377750 Change-Id: I556f5f2753fae77df4f34b64bccdb7d68f2825b0
34 lines
997 B
PHP
34 lines
997 B
PHP
<?php
|
|
|
|
use MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\ReCaptchaNoCaptchaAuthenticationRequest;
|
|
use MediaWiki\Tests\Auth\AuthenticationRequestTestCase;
|
|
|
|
/**
|
|
* @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__ . '/../..//includes/ReCaptchaNoCaptcha/ReCaptchaNoCaptchaAuthenticationRequest.php'
|
|
]
|
|
);
|
|
}
|
|
|
|
protected function getInstance( array $args = [] ) {
|
|
return new ReCaptchaNoCaptchaAuthenticationRequest();
|
|
}
|
|
|
|
public static function provideLoadFromSubmission() {
|
|
return [
|
|
'no proof' => [ [], [], false ],
|
|
'normal' => [ [], [ 'captchaWord' => 'abc' ], [ 'captchaWord' => 'abc' ] ],
|
|
];
|
|
}
|
|
}
|