diff options
author | Nils Adermann <naderman@naderman.de> | 2010-03-13 11:19:28 +0100 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-09-17 14:00:01 +0200 |
commit | ea919ad8b276c78207ec33d1fc34f1f0ef15bc0d (patch) | |
tree | b623b94b289ee9221713e7f77c93fe57de2215d6 /tests/request/request.php | |
parent | 85b6d3b9a1b346f36232d98bcf308f5635eb7f49 (diff) | |
download | forums-ea919ad8b276c78207ec33d1fc34f1f0ef15bc0d.tar forums-ea919ad8b276c78207ec33d1fc34f1f0ef15bc0d.tar.gz forums-ea919ad8b276c78207ec33d1fc34f1f0ef15bc0d.tar.bz2 forums-ea919ad8b276c78207ec33d1fc34f1f0ef15bc0d.tar.xz forums-ea919ad8b276c78207ec33d1fc34f1f0ef15bc0d.zip |
[feature/request-class] Refactored request class and wrapper functions.
The request class
- now makes use of the new type cast helper (dependency injection)
- has no static methods anymore.
- now has a constructor argument to leave super globals turned on
Brought back the set_var function in functions.php. It is now a wrapper
around the type cast helper. It creates an instance on the fly.
The request_var wrapper function now has an optional last argument to
inject the request class instance, rather than abusing the $var_name.
PHPBB3-9716
Diffstat (limited to 'tests/request/request.php')
-rw-r--r-- | tests/request/request.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/request/request.php b/tests/request/request.php index 1376d0665a..df71d783ed 100644 --- a/tests/request/request.php +++ b/tests/request/request.php @@ -9,6 +9,8 @@ */ require_once 'test_framework/framework.php'; +require_once '../phpBB/includes/request/type_cast_helper_interface.php'; +require_once '../phpBB/includes/request/type_cast_helper.php'; require_once '../phpBB/includes/request/request_interface.php'; require_once '../phpBB/includes/request/deactivated_super_global.php'; require_once '../phpBB/includes/request/request.php'; @@ -62,16 +64,6 @@ class phpbb_request_test extends phpbb_test_case $this->assertFalse($this->request->is_set_post('unset')); } - public function test_addslashes_recursively() - { - $data = array('some"string' => array('that"' => 'really"', 'needs"' => '"escaping')); - $expected = array('some\\"string' => array('that\\"' => 'really\\"', 'needs\\"' => '\\"escaping')); - - phpbb_request::addslashes_recursively($data); - - $this->assertEquals($expected, $data); - } - public function test_variable_names() { $expected = array('test', 'unset'); |