public function testValidateManyTimes() { $field = $this->createField('foo'); $constraint = new \Formz\Constraint\Number(''); $constraint->validate($field, 'foo'); $this->assertCount(1, $field->getErrors()); $constraint->validate($field, 'foo'); $this->assertCount(1, $field->getErrors()); }
/** * @dataProvider validData */ public function testCheck($expected, $value) { $constraint = new \Formz\Constraint\Number(''); $this->assertSame($expected, $constraint->check($value)); }