aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mock/request.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2014-06-11 14:28:06 +0200
committerNils Adermann <naderman@naderman.de>2014-06-11 14:28:06 +0200
commit86b5a815abb851a9c2fc9dc93a52de3fc641c699 (patch)
tree4f3a59ec63c976f75eb3212e34832ba16fd864b7 /tests/mock/request.php
parentee39a456647c2c7de4232b093024198f045b6ed2 (diff)
parent694f8391c9d3a948159ea2564e6bf4c606eb4053 (diff)
downloadforums-86b5a815abb851a9c2fc9dc93a52de3fc641c699.tar
forums-86b5a815abb851a9c2fc9dc93a52de3fc641c699.tar.gz
forums-86b5a815abb851a9c2fc9dc93a52de3fc641c699.tar.bz2
forums-86b5a815abb851a9c2fc9dc93a52de3fc641c699.tar.xz
forums-86b5a815abb851a9c2fc9dc93a52de3fc641c699.zip
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: (33 commits) [ticket/12352] Do not check hashes that don't have the necessary length [ticket/12352] Update file headers to fit new format [ticket/12352] Use custom provider collection for auth providers [ticket/12352] Add checks for existing user_pass_convert to migrations [ticket/12352] Remove usages of user_pass_convert column [ticket/12352] Update schema json file [ticket/12352] Remove user_pass_convert column from database [ticket/12352] Check each newly added passwords driver in manager_test [ticket/12352] Add get_settings_only method to passwords driver base [ticket/12352] Add passwords driver for xenforo 1.0, 1.1 passwords [ticket/12352] Add tests for wcf1 and wcf2 drivers [ticket/12352] Add driver for woltlab community framework 1 passwords [ticket/12352] Add driver for woltlab community framework 2 passwords [ticket/12352] Add missing $ to md5_mybb and md5_vb driver [ticket/12352] Fix spacing in passwords tests [ticket/12352] Add passwords driver for vB passwords [ticket/12352] Use correct hashing method in md5_mybb driver [ticket/12352] Add driver for myBB md5 passwords [ticket/12352] Rename phpbb2_md5 driver to fit filenames of other drivers [ticket/12352] Add passwords driver for sha1 password hashes ...
Diffstat (limited to 'tests/mock/request.php')
-rw-r--r--tests/mock/request.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/mock/request.php b/tests/mock/request.php
index 89d5321a25..304fcf0eaf 100644
--- a/tests/mock/request.php
+++ b/tests/mock/request.php
@@ -15,6 +15,8 @@ class phpbb_mock_request implements \phpbb\request\request_interface
{
protected $data;
+ protected $super_globals_disabled = false;
+
public function __construct($get = array(), $post = array(), $cookie = array(), $server = array(), $request = false, $files = array())
{
$this->data[\phpbb\request\request_interface::GET] = $get;
@@ -23,6 +25,8 @@ class phpbb_mock_request implements \phpbb\request\request_interface
$this->data[\phpbb\request\request_interface::REQUEST] = ($request === false) ? $post + $get : $request;
$this->data[\phpbb\request\request_interface::SERVER] = $server;
$this->data[\phpbb\request\request_interface::FILES] = $files;
+
+ $this->disable_super_globals();
}
public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST)
@@ -83,6 +87,21 @@ class phpbb_mock_request implements \phpbb\request\request_interface
return $this->data[$super_global];
}
+ public function super_globals_disabled()
+ {
+ return $this->super_globals_disabled;
+ }
+
+ public function disable_super_globals()
+ {
+ $this->super_globals_disabled = true;
+ }
+
+ public function enable_super_globals()
+ {
+ $this->super_globals_disabled = false;
+ }
+
/* custom methods */
public function set_header($header_name, $value)