mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Удалён лишний компонент ApiNormalizer
This commit is contained in:
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
namespace tests\codeception\api\traits;
|
||||
|
||||
use api\traits\ApiNormalize;
|
||||
use tests\codeception\api\unit\TestCase;
|
||||
|
||||
class ApiNormalizeTestClass {
|
||||
use ApiNormalize;
|
||||
}
|
||||
|
||||
class ApiNormalizerTest extends TestCase {
|
||||
|
||||
public function testNormalizeModelErrors() {
|
||||
$object = new ApiNormalizeTestClass();
|
||||
$normalized = $object->normalizeModelErrors([
|
||||
'rulesAgreement' => [
|
||||
'error.you_must_accept_rules',
|
||||
],
|
||||
'email' => [
|
||||
'error.email_required',
|
||||
],
|
||||
'username' => [
|
||||
'error.username_too_short',
|
||||
'error.username_not_unique',
|
||||
],
|
||||
]);
|
||||
|
||||
$this->assertEquals([
|
||||
'rulesAgreement' => 'error.you_must_accept_rules',
|
||||
'email' => 'error.email_required',
|
||||
'username' => 'error.username_too_short',
|
||||
], $normalized);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user