예제 #1
0
 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());
 }
예제 #2
0
 /**
  * @expectedException \Symfony\Component\Serializer\Exception\MappingException
  */
 public function testLoadClassMetadataReturnsThrowsInvalidMapping()
 {
     $loader = new YamlFileLoader(__DIR__ . '/../../Fixtures/invalid-mapping.yml');
     $loader->loadClassMetadata($this->metadata);
 }
예제 #3
0
 public function testLoadClassMetadata()
 {
     $this->loader->loadClassMetadata($this->metadata);
     $this->assertEquals(TestClassMetadataFactory::createXmlCLassMetadata(), $this->metadata);
 }