You are here

public function ClassMetadataTest::testAddPropertyConstraints in Zircon Profile 8.0

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

File

vendor/symfony/validator/Tests/Mapping/ClassMetadataTest.php, line 53

Class

ClassMetadataTest

Namespace

Symfony\Component\Validator\Tests\Mapping

Code

public function testAddPropertyConstraints() {
  $this->metadata
    ->addPropertyConstraint('firstName', new ConstraintA());
  $this->metadata
    ->addPropertyConstraint('lastName', new ConstraintB());
  $this
    ->assertEquals(array(
    'firstName',
    'lastName',
  ), $this->metadata
    ->getConstrainedProperties());
}