public function CollectionValidatorTest::testNullNotConsideredExtraField

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php, line 162

Class

CollectionValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testNullNotConsideredExtraField() {
  $data = $this
    ->prepareTestData(array(
    'foo' => null,
  ));
  $constraint = new Collection(array(
    'fields' => array(
      'foo' => new Range(array(
        'min' => 4,
      )),
    ),
  ));
  $this->context
    ->expects($this
    ->never())
    ->method('addViolationAt');
  $this->validator
    ->validate($data, $constraint);
}