@dataProvider provideInvalidComparisons
String
mixed $dirtyValue:
mixed $comparedValue:
string $comparedValueType:
public function testInvalidComparisonToValue($dirtyValue, $comparedValue, $comparedValueString, $comparedValueType) {
$constraint = $this
->createConstraint(array(
'value' => $comparedValue,
));
$constraint->message = 'Constraint Message';
$this->context
->expects($this
->any())
->method('getPropertyPath')
->will($this
->returnValue('property1'));
$this->context
->expects($this
->once())
->method('addViolation')
->with('Constraint Message', array(
'{{ value }}' => $comparedValueString,
'{{ compared_value }}' => $comparedValueString,
'{{ compared_value_type }}' => $comparedValueType,
));
$this->validator
->validate($dirtyValue, $constraint);
}