You are here

public function LazyLoadingMetadataFactoryTest::testLoadClassMetadata in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php \Symfony\Component\Validator\Tests\Mapping\Factory\LazyLoadingMetadataFactoryTest::testLoadClassMetadata()

File

vendor/symfony/validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php, line 24

Class

LazyLoadingMetadataFactoryTest

Namespace

Symfony\Component\Validator\Tests\Mapping\Factory

Code

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