ソースを参照

[HttpFoundation] Fixed failing tests introduced in 8dd0c5641a5b046324d129a993f199e51bdceadf

Bernhard Schussek 14 年 前
コミット
22c12e2c8f

+ 14 - 0
src/Symfony/Component/HttpFoundation/FileBag.php

@@ -23,6 +23,20 @@ class FileBag extends ParameterBag
 {
     private $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
 
+    /**
+     * Constructor.
+     *
+     * @param array $headers An array of HTTP files
+     */
+    public function __construct(array $parameters = array())
+    {
+        // this line is not necessary, but including it avoids any stupid
+        // errors if we add code to the parent's constructor
+        parent::__construct();
+
+        $this->replace($parameters);
+    }
+
     /**
      * (non-PHPdoc)
      * @see Symfony\Component\HttpFoundation\ParameterBag::replace()

+ 14 - 0
src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php

@@ -20,6 +20,20 @@ class ResponseHeaderBag extends HeaderBag
 {
     protected $computedCacheControl = array();
 
+    /**
+     * Constructor.
+     *
+     * @param array $headers An array of HTTP headers
+     */
+    public function __construct(array $parameters = array())
+    {
+        // this line is not necessary, but including it avoids any stupid
+        // errors if we add code to the parent's constructor
+        parent::__construct();
+
+        $this->replace($parameters);
+    }
+
     /**
      * {@inheritdoc}
      */