You are here

public function LegacyElementMetadataTest::testAddConstraints in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Mapping/LegacyElementMetadataTest.php, line 37

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());
}