You are here

public function AnnotationLoaderTest::testLoadClassMetadataAndMerge in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/Tests/Mapping/Loader/AnnotationLoaderTest.php \Symfony\Component\Validator\Tests\Mapping\Loader\AnnotationLoaderTest::testLoadClassMetadataAndMerge()
  2. 8 vendor/symfony/serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php \Symfony\Component\Serializer\Tests\Mapping\Loader\AnnotationLoaderTest::testLoadClassMetadataAndMerge()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php \Symfony\Component\Serializer\Tests\Mapping\Loader\AnnotationLoaderTest::testLoadClassMetadataAndMerge()

File

vendor/symfony/serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php, line 54

Class

AnnotationLoaderTest
@author Kévin Dunglas <dunglas@gmail.com>

Namespace

Symfony\Component\Serializer\Tests\Mapping\Loader

Code

public function testLoadClassMetadataAndMerge() {
  $classMetadata = new ClassMetadata('Symfony\\Component\\Serializer\\Tests\\Fixtures\\GroupDummy');
  $parentClassMetadata = new ClassMetadata('Symfony\\Component\\Serializer\\Tests\\Fixtures\\GroupDummyParent');
  $this->loader
    ->loadClassMetadata($parentClassMetadata);
  $classMetadata
    ->merge($parentClassMetadata);
  $this->loader
    ->loadClassMetadata($classMetadata);
  $this
    ->assertEquals(TestClassMetadataFactory::createClassMetadata(true), $classMetadata);
}