| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function testRegisterValidator() |
||
| 38 | { |
||
| 39 | $constraintMock = $this->getMockForAbstractClass( |
||
| 40 | 'Symfony\Component\Validator\Constraint', |
||
| 41 | array(), |
||
| 42 | 'MockConstraint' |
||
| 43 | ); |
||
| 44 | |||
| 45 | $validatorMock = $this->getMockForAbstractClass( |
||
| 46 | 'Symfony\Component\Validator\ConstraintValidator', |
||
| 47 | array(), |
||
| 48 | 'MockConstraintValidator' |
||
| 49 | ); |
||
| 50 | |||
| 51 | $validatorFactory = new ConstraintValidatorFactory(); |
||
| 52 | $validatorFactory->registerValidator($validatorMock); |
||
| 53 | |||
| 54 | $this->assertTrue($validatorMock === $validatorFactory->getInstance($constraintMock)); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..