You are here

public function AbstractValidatorTest::testIgnoreScalarsDuringArrayTraversal in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php \Symfony\Component\Validator\Tests\Validator\AbstractValidatorTest::testIgnoreScalarsDuringArrayTraversal()

File

vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php, line 647

Class

AbstractValidatorTest
@since 2.5

Namespace

Symfony\Component\Validator\Tests\Validator

Code

public function testIgnoreScalarsDuringArrayTraversal() {
  $entity = new Entity();
  $entity->reference = array(
    'string',
    1234,
  );
  $this->metadata
    ->addPropertyConstraint('reference', new Valid());
  $violations = $this
    ->validate($entity);

  /* @var ConstraintViolationInterface[] $violations */
  $this
    ->assertCount(0, $violations);
}