return [ ['The min value "foo" could not be converted to a "DateTimeImmutable" instance in the "Symfony\Component\Validator\Constraints\Range" constraint.',
new \
DateTimeImmutable(), 'foo', null
],
['The min value "foo" could not be converted to a "DateTime" instance in the "Symfony\Component\Validator\Constraints\Range" constraint.',
new \
DateTime(), 'foo', null
],
['The max value "foo" could not be converted to a "DateTimeImmutable" instance in the "Symfony\Component\Validator\Constraints\Range" constraint.',
new \
DateTimeImmutable(), null, 'foo'
],
['The max value "foo" could not be converted to a "DateTime" instance in the "Symfony\Component\Validator\Constraints\Range" constraint.',
new \
DateTime(), null, 'foo'
],
['The min value "bar" could not be converted to a "DateTimeImmutable" instance in the "Symfony\Component\Validator\Constraints\Range" constraint.',
new \
DateTimeImmutable(), 'bar', 'ccc'
],
];
} public function testNoViolationOnNullObjectWithPropertyPaths() { $this->
setObject(null
);
$this->validator->
validate(1,
new Range([ 'minPropertyPath' => 'minPropertyPath',
'maxPropertyPath' => 'maxPropertyPath',
]));
$this->
assertNoViolation();
} /**
* @dataProvider getTenToTwenty
*/