public function CollectionValidatorTest::testOptionalFieldNotPresent

File

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

Class

CollectionValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

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