You are here

public function LegacyElementMetadataTest::testAddConstraints in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/validator/Tests/Mapping/LegacyElementMetadataTest.php \Symfony\Component\Validator\Tests\Mapping\LegacyElementMetadataTest::testAddConstraints()

File

vendor/symfony/validator/Tests/Mapping/LegacyElementMetadataTest.php, line 35

Class

LegacyElementMetadataTest
@group legacy

Namespace

Symfony\Component\Validator\Tests\Mapping

Code

public function testAddConstraints() {
  $this->metadata
    ->addConstraint($constraint1 = new ConstraintA());
  $this->metadata
    ->addConstraint($constraint2 = new ConstraintA());
  $this
    ->assertEquals(array(
    $constraint1,
    $constraint2,
  ), $this->metadata
    ->getConstraints());
}