public function AllValidatorTest::testWalkSingleConstraint

@dataProvider getValidArguments

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php, line 61

Class

AllValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testWalkSingleConstraint($array) {
  $constraint = new Range(array(
    'min' => 4,
  ));
  $i = 1;
  foreach ($array as $key => $value) {
    $this->context
      ->expects($this
      ->at($i++))
      ->method('validateValue')
      ->with($value, $constraint, '[' . $key . ']', 'MyGroup');
  }
  $this->context
    ->expects($this
    ->never())
    ->method('addViolation');
  $this->validator
    ->validate($array, new All($constraint));
}