aboutsummaryrefslogtreecommitdiffstats
path: root/tests/log/function_add_log_test.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-12-11 10:24:49 +0100
committerJoas Schilling <nickvergessen@gmx.de>2012-12-11 10:24:49 +0100
commitf4bc9c1673c18ed24a2ba1680f6b9a5de5c491bf (patch)
tree36a86860a613f327c0c993ee58d678ccb7685a6c /tests/log/function_add_log_test.php
parent83b8b65016f172baa65cbbb463015602c97e9e45 (diff)
downloadforums-f4bc9c1673c18ed24a2ba1680f6b9a5de5c491bf.tar
forums-f4bc9c1673c18ed24a2ba1680f6b9a5de5c491bf.tar.gz
forums-f4bc9c1673c18ed24a2ba1680f6b9a5de5c491bf.tar.bz2
forums-f4bc9c1673c18ed24a2ba1680f6b9a5de5c491bf.tar.xz
forums-f4bc9c1673c18ed24a2ba1680f6b9a5de5c491bf.zip
[ticket/10714] Fix dependency injections in unit tests with mocks
PHPBB3-10714
Diffstat (limited to 'tests/log/function_add_log_test.php')
-rw-r--r--tests/log/function_add_log_test.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/log/function_add_log_test.php b/tests/log/function_add_log_test.php
index 7ed862c523..0a65ce3165 100644
--- a/tests/log/function_add_log_test.php
+++ b/tests/log/function_add_log_test.php
@@ -142,7 +142,7 @@ class phpbb_log_function_add_log_test extends phpbb_database_test_case
*/
public function test_add_log_function($expected, $user_id, $mode, $required1, $additional1 = null, $additional2 = null, $additional3 = null)
{
- global $db, $cache, $user, $phpbb_log, $phpbb_dispatcher;
+ global $db, $cache, $user, $phpbb_log, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
if ($expected)
{
@@ -157,7 +157,10 @@ class phpbb_log_function_add_log_test extends phpbb_database_test_case
$db = $this->new_dbal();
$cache = new phpbb_mock_cache;
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
- $phpbb_log = new phpbb_log(LOG_TABLE);
+ $user = $this->getMock('phpbb_user');
+ $auth = $this->getMock('phpbb_auth');
+
+ $phpbb_log = new phpbb_log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, $phpEx, LOG_TABLE);
$user->ip = 'user_ip';
if ($user_id)