public function CollectionValidatorTest::testOptionalFieldPresent

File

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

Class

CollectionValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testOptionalFieldPresent() {
  $data = $this
    ->prepareTestData(array(
    'foo' => null,
  ));
  $this->context
    ->expects($this
    ->never())
    ->method('addViolationAt');
  $this->validator
    ->validate($data, new Collection(array(
    'foo' => new Optional(),
  )));
}