public function testMaxDepth() { $classMetadata = new ClassMetadata('Symfony\\Component\\Serializer\\Tests\\Fixtures\\MaxDepthDummy'); $this->loader->loadClassMetadata($classMetadata); $attributesMetadata = $classMetadata->getAttributesMetadata(); $this->assertEquals(2, $attributesMetadata['foo']->getMaxDepth()); $this->assertEquals(3, $attributesMetadata['bar']->getMaxDepth()); }
/** * @expectedException \Symfony\Component\Serializer\Exception\MappingException */ public function testLoadClassMetadataReturnsThrowsInvalidMapping() { $loader = new YamlFileLoader(__DIR__ . '/../../Fixtures/invalid-mapping.yml'); $loader->loadClassMetadata($this->metadata); }
public function testLoadClassMetadata() { $this->loader->loadClassMetadata($this->metadata); $this->assertEquals(TestClassMetadataFactory::createXmlCLassMetadata(), $this->metadata); }