Total Complexity | 4 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | final class ValidatorInterfaceProxyTest extends AbstractCollectorTestCase |
||
14 | { |
||
15 | /** |
||
16 | * @param CollectorInterface|ValidatorCollector $collector |
||
17 | */ |
||
18 | protected function collectTestData(CollectorInterface $collector): void |
||
22 | } |
||
23 | |||
24 | protected function getCollector(): CollectorInterface |
||
25 | { |
||
26 | return new ValidatorCollector(); |
||
27 | } |
||
28 | |||
29 | protected function checkCollectedData(array $data): void |
||
30 | { |
||
31 | parent::checkCollectedData($data); |
||
32 | |||
33 | $this->assertEquals( |
||
34 | [ |
||
35 | [ |
||
36 | 'value' => 1, |
||
37 | 'rules' => [ |
||
38 | new Number(min: 7), |
||
39 | ], |
||
40 | 'result' => false, |
||
41 | 'errors' => [ |
||
42 | new Error('Too low', ['arg1' => 'v1']), |
||
43 | ], |
||
44 | ], |
||
45 | [ |
||
46 | 'value' => 10, |
||
47 | 'rules' => [ |
||
48 | new Number(min: 7), |
||
49 | ], |
||
50 | 'result' => true, |
||
51 | 'errors' => [], |
||
52 | ], |
||
53 | ], |
||
54 | $data |
||
55 | ); |
||
56 | } |
||
57 | |||
58 | protected function checkIndexData(array $data): void |
||
65 | ); |
||
66 | } |
||
67 | } |
||
68 |