public function RangeValidatorTest::testInvalidValuesMax

@dataProvider getMoreThanTwenty

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php, line 130

Class

RangeValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidValuesMax($value) {
  $constraint = new Range(array(
    'max' => 20,
    'maxMessage' => 'myMessage',
  ));
  $this->context
    ->expects($this
    ->once())
    ->method('addViolation')
    ->with('myMessage', $this
    ->identicalTo(array(
    '{{ value }}' => $value,
    '{{ limit }}' => 20,
  )));
  $this->validator
    ->validate($value, $constraint);
}