Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / serializer / Tests / Mapping / Loader / AnnotationLoaderTest.php
index d732ee721708b362e347cff705b2b2bb6afe342d..b2e5c69211227442e469122cbfa71ecfc5288bad 100644 (file)
@@ -44,7 +44,7 @@ class AnnotationLoaderTest extends TestCase
         $this->assertTrue($this->loader->loadClassMetadata($classMetadata));
     }
 
-    public function testLoadClassMetadata()
+    public function testLoadGroups()
     {
         $classMetadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy');
         $this->loader->loadClassMetadata($classMetadata);
@@ -52,6 +52,16 @@ class AnnotationLoaderTest extends TestCase
         $this->assertEquals(TestClassMetadataFactory::createClassMetadata(), $classMetadata);
     }
 
+    public function testLoadMaxDepth()
+    {
+        $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());
+    }
+
     public function testLoadClassMetadataAndMerge()
     {
         $classMetadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy');