Пример #1
0
 public function testAddCustomConstraintShouldWork()
 {
     $validator = new Validator();
     $validator->registerConstraint(new PasswordConstraint());
     $this->assertTrue($validator->password()->validate("pass@2012"));
     $this->assertFalse($validator->password()->validate("12345678"));
 }