public function DateTimeValidatorTest::testInvalidDateTimes in Plug 7
@dataProvider getInvalidDateTimes
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ DateTimeValidatorTest.php, line 81
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testInvalidDateTimes($dateTime, $code) {
$constraint = new DateTime(array(
'message' => 'myMessage',
));
$this->validator
->validate($dateTime, $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ value }}', '"' . $dateTime . '"')
->setCode($code)
->assertRaised();
}