aboutsummaryrefslogtreecommitdiffstats
path: root/tests/request
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-03-13 11:28:41 +0100
committerNils Adermann <naderman@naderman.de>2010-09-17 14:03:47 +0200
commit0ae7df8a51129f2ece86f959e2e155d988feb081 (patch)
tree83d3e88e835db37e517c3999823b3c314abfe052 /tests/request
parentea919ad8b276c78207ec33d1fc34f1f0ef15bc0d (diff)
downloadforums-0ae7df8a51129f2ece86f959e2e155d988feb081.tar
forums-0ae7df8a51129f2ece86f959e2e155d988feb081.tar.gz
forums-0ae7df8a51129f2ece86f959e2e155d988feb081.tar.bz2
forums-0ae7df8a51129f2ece86f959e2e155d988feb081.tar.xz
forums-0ae7df8a51129f2ece86f959e2e155d988feb081.zip
[feature/request-class] Request class test now uses a type cast helper mock.
Removed the dependency of the request class test on having an actual phpbb_type_cast_helper instance, by replacing it with an object mocking the phpbb_type_cast_helper_interface. PHPBB3-9716
Diffstat (limited to 'tests/request')
-rw-r--r--tests/request/request.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/request/request.php b/tests/request/request.php
index df71d783ed..ebfc3ba2b0 100644
--- a/tests/request/request.php
+++ b/tests/request/request.php
@@ -10,13 +10,13 @@
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';
class phpbb_request_test extends phpbb_test_case
{
+ private $type_cast_helper;
private $request;
protected function setUp()
@@ -28,7 +28,9 @@ class phpbb_request_test extends phpbb_test_case
$_REQUEST['test'] = 3;
$_GET['unset'] = '';
- $this->request = new phpbb_request();
+ $this->type_cast_helper = $this->getMock('phpbb_type_cast_helper_interface');
+
+ $this->request = new phpbb_request($this->type_cast_helper);
}
public function test_toggle_super_globals()