You are here

public function ClassMetadataTest::testMemberMetadatas in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php, line 160

Class

ClassMetadataTest

Namespace

Symfony\Component\Validator\Tests\Mapping

Code

public function testMemberMetadatas() {
  $this->metadata
    ->addPropertyConstraint('firstName', new ConstraintA());
  $this
    ->assertTrue($this->metadata
    ->hasPropertyMetadata('firstName'));
  $this
    ->assertFalse($this->metadata
    ->hasPropertyMetadata('non_existant_field'));
}