public function LegacyElementMetadataTest::testFindConstraintsByGroup in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/Mapping/LegacyElementMetadataTest.php \Symfony\Component\Validator\Tests\Mapping\LegacyElementMetadataTest::testFindConstraintsByGroup()
File
- vendor/
symfony/ validator/ Tests/ Mapping/ LegacyElementMetadataTest.php, line 54
Class
- LegacyElementMetadataTest
- @group legacy
Namespace
Symfony\Component\Validator\Tests\MappingCode
public function testFindConstraintsByGroup() {
$constraint1 = new ConstraintA(array(
'groups' => 'TestGroup',
));
$constraint2 = new ConstraintB();
$this->metadata
->addConstraint($constraint1);
$this->metadata
->addConstraint($constraint2);
$this
->assertEquals(array(
$constraint1,
), $this->metadata
->findConstraints('TestGroup'));
}