mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Тесты для AuthorizationForm и кастомного RequiredValidator
В модуль Authserver добавлены хелперы для логирования Исправлена ошибка в MinecraftAccessKey Ускорено тестирование всего приложения
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace codeception\api\unit\modules\authserver\validators;
|
||||
|
||||
use api\modules\authserver\validators\RequiredValidator;
|
||||
use tests\codeception\api\unit\TestCase;
|
||||
use tests\codeception\common\_support\ProtectedCaller;
|
||||
|
||||
class RequiredValidatorTest extends TestCase {
|
||||
use ProtectedCaller;
|
||||
|
||||
public function testValidateValueNormal() {
|
||||
$validator = new RequiredValidator();
|
||||
$this->assertNull($this->callProtected($validator, 'validateValue', 'dummy'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \api\modules\authserver\exceptions\IllegalArgumentException
|
||||
*/
|
||||
public function testValidateValueEmpty() {
|
||||
$validator = new RequiredValidator();
|
||||
$this->assertNull($this->callProtected($validator, 'validateValue', ''));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user