public function RangeValidatorTest::testMinMessageIsSet

File

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

Class

RangeValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testMinMessageIsSet() {
  $constraint = new Range(array(
    'min' => 10,
    'max' => 20,
    'minMessage' => 'myMessage',
  ));
  $this->context
    ->expects($this
    ->once())
    ->method('addViolation')
    ->with('myMessage', array(
    '{{ value }}' => 9,
    '{{ limit }}' => 10,
  ));
  $this->validator
    ->validate(9, $constraint);
}