Тесты для AuthorizationForm и кастомного RequiredValidator

В модуль Authserver добавлены хелперы для логирования
Исправлена ошибка в MinecraftAccessKey
Ускорено тестирование всего приложения
This commit is contained in:
ErickSkrauch
2016-08-29 02:17:45 +03:00
parent d37a865e14
commit 9c658f5bd9
9 changed files with 241 additions and 13 deletions

View File

@ -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', ''));
}
}