| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function testGivenHarmfulText_itProvidesAConstraintViolation(): void { |
||
| 34 | $textPolicy = $this->createMock( TextPolicyValidator::class ); |
||
| 35 | $textPolicy->method( $this->anything() )->willReturn( false ); |
||
| 36 | $validator = new FieldTextPolicyValidator( $textPolicy ); |
||
| 37 | |||
| 38 | $this->assertInstanceOf( |
||
| 39 | ConstraintViolation::class, |
||
| 40 | $validator->validate( 'mean tiger' )->getViolations()[0] |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |