mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Форма запроса восстановления пароля теперь требует разгадки капчи
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace codeception\api\unit\models\authentication;
|
||||
|
||||
use api\components\ReCaptcha\Validator as ReCaptchaValidator;
|
||||
use api\models\authentication\ForgotPasswordForm;
|
||||
use Codeception\Specify;
|
||||
use common\models\EmailActivation;
|
||||
@ -8,10 +9,20 @@ use OTPHP\TOTP;
|
||||
use tests\codeception\api\unit\TestCase;
|
||||
use tests\codeception\common\fixtures\AccountFixture;
|
||||
use tests\codeception\common\fixtures\EmailActivationFixture;
|
||||
use Yii;
|
||||
|
||||
class ForgotPasswordFormTest extends TestCase {
|
||||
use Specify;
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
Yii::$container->set(ReCaptchaValidator::class, new class extends ReCaptchaValidator {
|
||||
public function validateValue($value) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function _fixtures() {
|
||||
return [
|
||||
'accounts' => AccountFixture::class,
|
||||
|
Reference in New Issue
Block a user