public function LengthValidatorTest::testValidValuesMax

@dataProvider getThreeOrLessCharacters

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php, line 124

Class

LengthValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testValidValuesMax($value, $mbOnly = false) {
  if ($mbOnly && !function_exists('mb_strlen')) {
    $this
      ->markTestSkipped('mb_strlen does not exist');
  }
  $this->context
    ->expects($this
    ->never())
    ->method('addViolation');
  $constraint = new Length(array(
    'max' => 3,
  ));
  $this->validator
    ->validate($value, $constraint);
}