2016-05-03 16:42:00 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use MediaWiki\Auth\AuthenticationRequestTestCase;
|
|
|
|
|
2016-08-05 17:15:41 +00:00
|
|
|
require_once __DIR__ . '/../../ReCaptcha/ReCaptchaAuthenticationRequest.php';
|
2016-05-03 16:42:00 +00:00
|
|
|
|
2018-01-23 23:59:08 +00:00
|
|
|
/**
|
|
|
|
* @covers ReCaptchaAuthenticationRequest
|
|
|
|
*/
|
2016-05-03 16:42:00 +00:00
|
|
|
class ReCaptchaAuthenticationRequestTest extends AuthenticationRequestTestCase {
|
|
|
|
protected function getInstance( array $args = [] ) {
|
|
|
|
return new ReCaptchaAuthenticationRequest();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function provideLoadFromSubmission() {
|
|
|
|
return [
|
|
|
|
'no challange id' => [ [], [ 'captchaWord' => 'abc' ], false ],
|
|
|
|
'no solution' => [ [], [ 'captchaId' => '123' ], false ],
|
|
|
|
'normal' => [ [], [ 'captchaId' => '123', 'captchaWord' => 'abc' ],
|
|
|
|
[ 'captchaId' => '123', 'captchaWord' => 'abc' ] ],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|