Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / http-foundation / Tests / HeaderBagTest.php
index e5b1b38fdd028417727fb4a9a7c1aa01220209a2..1acf593086772ec4ab64aa3d08f44c3d5154f7d9 100644 (file)
@@ -172,6 +172,15 @@ class HeaderBagTest extends TestCase
         $this->assertEquals(10, $bag->getCacheControlDirective('max-age'));
     }
 
+    public function testCacheControlClone()
+    {
+        $headers = array('foo' => 'bar');
+        $bag1 = new HeaderBag($headers);
+        $bag2 = new HeaderBag($bag1->all());
+
+        $this->assertEquals($bag1->all(), $bag2->all());
+    }
+
     public function testGetIterator()
     {
         $headers = array('foo' => 'bar', 'hello' => 'world', 'third' => 'charm');