Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
48 | public function testNormalizeWithArrayResult( |
||
49 | array $expected, |
||
50 | callable|iterable|object|string|null $rules, |
||
51 | mixed $data = null |
||
52 | ): void { |
||
53 | $rules = RulesNormalizer::normalize($rules, $data); |
||
54 | |||
55 | $result = []; |
||
56 | foreach ($rules as $attributeName => $attributeRules) { |
||
57 | $result[$attributeName] = []; |
||
58 | foreach ($attributeRules as $rule) { |
||
59 | $result[$attributeName][] = $rule->getName(); |
||
60 | } |
||
61 | } |
||
62 | |||
63 | $this->assertSame($expected, $result); |
||
64 | } |
||
66 |