public function LegacyElementMetadataTest::testMultipleConstraintsOfTheSameType in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Mapping/ LegacyElementMetadataTest.php, line 45
Class
- LegacyElementMetadataTest
- @group legacy
Namespace
Symfony\Component\Validator\Tests\MappingCode
public function testMultipleConstraintsOfTheSameType() {
$constraint1 = new ConstraintA(array(
'property1' => 'A',
));
$constraint2 = new ConstraintA(array(
'property1' => 'B',
));
$this->metadata
->addConstraint($constraint1);
$this->metadata
->addConstraint($constraint2);
$this
->assertEquals(array(
$constraint1,
$constraint2,
), $this->metadata
->getConstraints());
}