public function AbstractValidatorTest::testIgnoreNullDuringArrayTraversal in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Validator/ AbstractValidatorTest.php, line 659
Class
- AbstractValidatorTest
- @since 2.5 @author Bernhard Schussek <bschussek@gmail.com>
Namespace
Symfony\Component\Validator\Tests\ValidatorCode
public function testIgnoreNullDuringArrayTraversal() {
$entity = new Entity();
$entity->reference = array(
null,
);
$this->metadata
->addPropertyConstraint('reference', new Valid());
$violations = $this
->validate($entity);
/** @var ConstraintViolationInterface[] $violations */
$this
->assertCount(0, $violations);
}