Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / serializer / Tests / Mapping / Loader / YamlFileLoaderTest.php
index caf7f41766692440bccce79d4a18af223a793c1f..918af73b14d8f77feaba8cbf4e4bed0b80200309 100644 (file)
@@ -67,4 +67,14 @@ class YamlFileLoaderTest extends TestCase
 
         $this->assertEquals(TestClassMetadataFactory::createXmlCLassMetadata(), $this->metadata);
     }
+
+    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());
+    }
 }