diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2012-11-11 04:42:06 -0600 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2012-11-11 04:42:06 -0600 |
commit | 84ba10ec8c023ab307eb7d0b829ab337aaaae78e (patch) | |
tree | 468abf9fbb513cba53803ca29c6b65fd4ea497ec /tests/mock | |
parent | 106daa09ebb5b12bf9892c41f8c1de627cf6b0e9 (diff) | |
parent | e86ecc0f3bd6383d31a670896720a970b8faaaa9 (diff) | |
download | forums-84ba10ec8c023ab307eb7d0b829ab337aaaae78e.tar forums-84ba10ec8c023ab307eb7d0b829ab337aaaae78e.tar.gz forums-84ba10ec8c023ab307eb7d0b829ab337aaaae78e.tar.bz2 forums-84ba10ec8c023ab307eb7d0b829ab337aaaae78e.tar.xz forums-84ba10ec8c023ab307eb7d0b829ab337aaaae78e.zip |
Merge branch 'develop' of github.com:EXreaction/phpbb3 into ticket/11103
Diffstat (limited to 'tests/mock')
-rw-r--r-- | tests/mock/request.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/mock/request.php b/tests/mock/request.php index 946dfdada9..2a272fc03b 100644 --- a/tests/mock/request.php +++ b/tests/mock/request.php @@ -11,13 +11,14 @@ class phpbb_mock_request implements phpbb_request_interface { protected $data; - public function __construct($get = array(), $post = array(), $cookie = array(), $server = array(), $request = false) + public function __construct($get = array(), $post = array(), $cookie = array(), $server = array(), $request = false, $files = array()) { $this->data[phpbb_request_interface::GET] = $get; $this->data[phpbb_request_interface::POST] = $post; $this->data[phpbb_request_interface::COOKIE] = $cookie; $this->data[phpbb_request_interface::REQUEST] = ($request === false) ? $post + $get : $request; $this->data[phpbb_request_interface::SERVER] = $server; + $this->data[phpbb_request_interface::FILES] = $files; } public function overwrite($var_name, $value, $super_global = phpbb_request_interface::REQUEST) @@ -42,6 +43,12 @@ class phpbb_mock_request implements phpbb_request_interface return $this->server($var_name, $default); } + public function file($form_name) + { + $super_global = phpbb_request_interface::FILES; + return isset($this->data[$super_global][$form_name]) ? $this->data[$super_global][$form_name] : array(); + } + public function is_set_post($name) { return $this->is_set($name, phpbb_request_interface::POST); |