| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function validateValues(): void |
||
| 18 | { |
||
| 19 | $values = [ |
||
| 20 | 10, 20, 30 |
||
| 21 | ]; |
||
| 22 | |||
| 23 | $rules = new Rules([ |
||
| 24 | (new Number())->max(13) |
||
| 25 | ]); |
||
| 26 | |||
| 27 | $result = (new Each($rules))->validate($values); |
||
| 28 | $errors = $result->getErrors(); |
||
| 29 | |||
| 30 | $this->assertFalse($result->isValid()); |
||
| 31 | $this->assertCount(2, $errors); |
||
| 32 | $this->assertContains('Value must be no greater than 13. 20 given.', $errors); |
||
| 33 | $this->assertContains('Value must be no greater than 13. 30 given.', $errors); |
||
| 34 | } |
||
| 36 |