You are here

public function TimeValidatorTest::testInvalidTimes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/TimeValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\TimeValidatorTest::testInvalidTimes()

@dataProvider getInvalidTimes

File

vendor/symfony/validator/Tests/Constraints/TimeValidatorTest.php, line 81

Class

TimeValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidTimes($time, $code) {
  $constraint = new Time(array(
    'message' => 'myMessage',
  ));
  $this->validator
    ->validate($time, $constraint);
  $this
    ->buildViolation('myMessage')
    ->setParameter('{{ value }}', '"' . $time . '"')
    ->setCode($code)
    ->assertRaised();
}