]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blob - extensions/ConfirmEdit/tests/phpunit/ReCaptchaAuthenticationRequestTest.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / extensions / ConfirmEdit / tests / phpunit / ReCaptchaAuthenticationRequestTest.php
1 <?php
2
3 use MediaWiki\Auth\AuthenticationRequestTestCase;
4
5 require_once __DIR__ . '/../../ReCaptcha/ReCaptchaAuthenticationRequest.php';
6
7 class ReCaptchaAuthenticationRequestTest extends AuthenticationRequestTestCase {
8         protected function getInstance( array $args = [] ) {
9                 return new ReCaptchaAuthenticationRequest();
10         }
11
12         public function provideLoadFromSubmission() {
13                 return [
14                         'no challange id' => [ [], [ 'captchaWord' => 'abc' ], false ],
15                         'no solution' => [ [], [ 'captchaId' => '123' ], false ],
16                         'normal' => [ [], [ 'captchaId' => '123', 'captchaWord' => 'abc' ],
17                                 [ 'captchaId' => '123', 'captchaWord' => 'abc' ] ],
18                 ];
19         }
20 }