| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function testMultipleViolations_canByConvertedToArray(): void { |
||
| 18 | $mapper = new ConstraintViolationListMapper(); |
||
| 19 | |||
| 20 | $violationOne = new ConstraintViolation( 'not good', null, [], null, '[lorem]', 5 ); |
||
| 21 | $violationTwo = new ConstraintViolation( 'neither', null, [], null, '[lorem]', 7 ); |
||
| 22 | $violationThree = new ConstraintViolation( 'oops', null, [], null, '[ipsum]', 9000 ); |
||
| 23 | $violations = new ConstraintViolationList( [ $violationOne, $violationTwo, $violationThree ] ); |
||
| 24 | |||
| 25 | $this->assertEquals( |
||
| 26 | [ |
||
| 27 | 'lorem' => [ 'not good', 'neither' ], |
||
| 28 | 'ipsum' => [ 'oops' ] |
||
| 29 | ], |
||
| 30 | $mapper->map( $violations ) |
||
| 31 | ); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |