You are here

public function AllValidatorTest::testWalkSingleConstraint in Plug 7

@dataProvider getValidArguments

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php, line 50

Class

AllValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testWalkSingleConstraint($array) {
  $constraint = new Range(array(
    'min' => 4,
  ));
  $i = 0;
  foreach ($array as $key => $value) {
    $this
      ->expectValidateValueAt($i++, '[' . $key . ']', $value, array(
      $constraint,
    ));
  }
  $this->validator
    ->validate($array, new All($constraint));
  $this
    ->assertNoViolation();
}