You are here

public static function TestClassMetadataFactory::createXmlCLassMetadata in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/serializer/Tests/Mapping/TestClassMetadataFactory.php \Symfony\Component\Serializer\Tests\Mapping\TestClassMetadataFactory::createXmlCLassMetadata()
2 calls to TestClassMetadataFactory::createXmlCLassMetadata()
XmlFileLoaderTest::testLoadClassMetadata in vendor/symfony/serializer/Tests/Mapping/Loader/XmlFileLoaderTest.php
YamlFileLoaderTest::testLoadClassMetadata in vendor/symfony/serializer/Tests/Mapping/Loader/YamlFileLoaderTest.php

File

vendor/symfony/serializer/Tests/Mapping/TestClassMetadataFactory.php, line 67

Class

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

Namespace

Symfony\Component\Serializer\Tests\Mapping

Code

public static function createXmlCLassMetadata() {
  $expected = new ClassMetadata('Symfony\\Component\\Serializer\\Tests\\Fixtures\\GroupDummy');
  $foo = new AttributeMetadata('foo');
  $foo
    ->addGroup('group1');
  $foo
    ->addGroup('group2');
  $expected
    ->addAttributeMetadata($foo);
  $bar = new AttributeMetadata('bar');
  $bar
    ->addGroup('group2');
  $expected
    ->addAttributeMetadata($bar);
  return $expected;
}