public function ClassMetadataFactoryTest::testLoadClassMetadata

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Mapping/ClassMetadataFactoryTest.php, line 25

Class

ClassMetadataFactoryTest

Namespace

Symfony\Component\Validator\Tests\Mapping

Code

public function testLoadClassMetadata() {
  $factory = new ClassMetadataFactory(new TestLoader());
  $metadata = $factory
    ->getMetadataFor(self::PARENTCLASS);
  $constraints = array(
    new ConstraintA(array(
      'groups' => array(
        'Default',
        'EntityParent',
      ),
    )),
  );
  $this
    ->assertEquals($constraints, $metadata
    ->getConstraints());
}