public function LengthValidatorTest::testValidValuesExact

@dataProvider getFourCharacters

File

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

Class

LengthValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testValidValuesExact($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(4);
  $this->validator
    ->validate($value, $constraint);
}