Passed
Push — master ( e418b3...ad378d )
by Sergei
02:41
created

StopOnErrorTest::testClassAttribute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 9
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator\Tests\TestEnvironments\Php81\Rule;
6
7
use PHPUnit\Framework\TestCase;
8
use Yiisoft\Validator\Tests\Support\Data\StopOnErrorDto;
9
use Yiisoft\Validator\Validator;
10
11
final class StopOnErrorTest extends TestCase
12
{
13
    public function testClassAttribute(): void
14
    {
15
        $result = (new Validator())->validate(new StopOnErrorDto());
16
17
        $this->assertSame(
18
            [
19
                '' => ['error A'],
20
            ],
21
            $result->getErrorMessagesIndexedByAttribute()
22
        );
23
    }
24
}
25