| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 12 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 27 | public function itShouldProvideTheListOfViolations() | ||
| 28 |     { | ||
| 29 | /** @var ConstraintViolation|MockObject $violation */ | ||
| 30 | $violation = $this->createMock(ConstraintViolation::class); | ||
| 31 |         $violation->expects($this->once())->method('getProperty')->willReturn('foo'); | ||
| 32 |         $violation->expects($this->once())->method('getMessage')->willReturn('bar is not a string'); | ||
| 33 |         $violation->expects($this->once())->method('getConstraint')->willReturn(''); | ||
| 34 |         $violation->expects($this->once())->method('getLocation')->willReturn('foo'); | ||
| 35 | |||
| 36 | $exception = new ConstraintViolations([$violation]); | ||
| 37 | |||
| 38 | $this->assertSame([$violation], $exception->getViolations()); | ||
| 39 | } | ||
| 41 |