public function RangeValidatorTest::testInvalidValuesCombinedMin in Plug 7
@dataProvider getLessThanTen
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ RangeValidatorTest.php, line 167
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testInvalidValuesCombinedMin($value, $formattedValue) {
$constraint = new Range(array(
'min' => 10,
'max' => 20,
'minMessage' => 'myMinMessage',
'maxMessage' => 'myMaxMessage',
));
$this->validator
->validate($value, $constraint);
$this
->buildViolation('myMinMessage')
->setParameter('{{ value }}', $formattedValue)
->setParameter('{{ limit }}', 10)
->setCode(Range::BELOW_RANGE_ERROR)
->assertRaised();
}