aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
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 /phpBB/common.php
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 'phpBB/common.php')
-rw-r--r--phpBB/common.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index a4be46f987..57a1384ee4 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -195,6 +195,8 @@ require($phpbb_root_path . 'includes/template.' . $phpEx);
require($phpbb_root_path . 'includes/session.' . $phpEx);
require($phpbb_root_path . 'includes/auth.' . $phpEx);
+require($phpbb_root_path . 'includes/request/type_cast_helper_interface.' . $phpEx);
+require($phpbb_root_path . 'includes/request/type_cast_helper.' . $phpEx);
require($phpbb_root_path . 'includes/request/deactivated_super_global.' . $phpEx);
require($phpbb_root_path . 'includes/request/request_interface.' . $phpEx);
require($phpbb_root_path . 'includes/request/request.' . $phpEx);
@@ -209,7 +211,7 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
// Instantiate some basic classes
-$request = new phpbb_request();
+$request = new phpbb_request(new phpbb_type_cast_helper());
$user = new user();
$auth = new auth();
$template = new template();
@@ -220,7 +222,7 @@ $class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx, $cache);
$class_loader->register();
// make sure request_var uses this request instance
-request_var($request, 0); // "dependency injection" for a function
+request_var('', 0, false, false, $request); // "dependency injection" for a function
// Connect to DB
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, defined('PHPBB_DB_NEW_LINK') ? PHPBB_DB_NEW_LINK : false);