diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-03-13 11:28:41 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-09-17 14:03:47 +0200 |
| commit | 0ae7df8a51129f2ece86f959e2e155d988feb081 (patch) | |
| tree | 83d3e88e835db37e517c3999823b3c314abfe052 /phpBB/install/database_update.php | |
| parent | ea919ad8b276c78207ec33d1fc34f1f0ef15bc0d (diff) | |
| download | forums-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/install/database_update.php')
| -rw-r--r-- | phpBB/install/database_update.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index d571d41be4..483f24f3e5 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -66,6 +66,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); @@ -95,13 +97,13 @@ else define('STRIP', (get_magic_quotes_gpc()) ? true : false); } -$request = new phpbb_request(); +$request = new phpbb_request(new phpbb_type_cast_helper()); $user = new user(); $cache = new cache(); $db = new $sql_db(); // 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 // Add own hook handler, if present. :o if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx)) |
