You are here

public function TimeValidatorTest::testInvalidTimes in Plug 7

@dataProvider getInvalidTimes

File

lib/Symfony/validator/Symfony/Component/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();
}