소스 검색

[HttpFoundation] Fixed failing tests introduced in 8dd0c5641a5b046324d129a993f199e51bdceadf

Bernhard Schussek 14 년 전
부모
커밋
22c12e2c8f
2개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  1. 14 0
      src/Symfony/Component/HttpFoundation/FileBag.php
  2. 14 0
      src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php

+ 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}
      */