Exemple #1
0
 public function testIsGettingErrorMessage()
 {
     $constraint = new Pattern('/^\\d{4}\\-\\d{2}-\\d{2}$/');
     $this->assertFalse($constraint->validate(null));
     $this->assertEquals('[field] Required pattern does not match', $constraint->getErrorMessage('field'));
 }