aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorbrunoais <brunoaiss@gmail.com>2014-12-03 15:10:32 +0000
committerbrunoais <brunoaiss@gmail.com>2014-12-03 15:10:32 +0000
commit1c02f7e032cf2d28b70739d02edaea7354fcf887 (patch)
tree258f36f715934cb54171037433fa24663f86d43c /tests
parentf045744606a945a190728c5ad17350776374a6a9 (diff)
downloadforums-1c02f7e032cf2d28b70739d02edaea7354fcf887.tar
forums-1c02f7e032cf2d28b70739d02edaea7354fcf887.tar.gz
forums-1c02f7e032cf2d28b70739d02edaea7354fcf887.tar.bz2
forums-1c02f7e032cf2d28b70739d02edaea7354fcf887.tar.xz
forums-1c02f7e032cf2d28b70739d02edaea7354fcf887.zip
[ticket/13146] Adding required tests modifications for the new constructor
PHPBB3-13146
Diffstat (limited to 'tests')
-rw-r--r--tests/content_visibility/get_forums_visibility_sql_test.php3
-rw-r--r--tests/content_visibility/get_global_visibility_sql_test.php3
-rw-r--r--tests/content_visibility/get_visibility_sql_test.php3
-rw-r--r--tests/content_visibility/set_post_visibility_test.php3
-rw-r--r--tests/content_visibility/set_topic_visibility_test.php3
5 files changed, 10 insertions, 5 deletions
diff --git a/tests/content_visibility/get_forums_visibility_sql_test.php b/tests/content_visibility/get_forums_visibility_sql_test.php
index fe7ab36436..6be26a4072 100644
--- a/tests/content_visibility/get_forums_visibility_sql_test.php
+++ b/tests/content_visibility/get_forums_visibility_sql_test.php
@@ -136,7 +136,8 @@ class phpbb_content_visibility_get_forums_visibility_sql_test extends phpbb_data
->will($this->returnValueMap($permissions));
$user = new \phpbb\user('\phpbb\datetime');
$config = new phpbb\config\config(array());
- $content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+ $phpbb_dispatcher = $this->getMock('\phpbb\event\dispatcher');
+ $content_visibility = new \phpbb\content_visibility($auth, $config, $phpbb_dispatcher, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
$result = $db->sql_query('SELECT ' . $mode . '_id
FROM ' . $table . '
diff --git a/tests/content_visibility/get_global_visibility_sql_test.php b/tests/content_visibility/get_global_visibility_sql_test.php
index 43a80c792b..441c13cfc6 100644
--- a/tests/content_visibility/get_global_visibility_sql_test.php
+++ b/tests/content_visibility/get_global_visibility_sql_test.php
@@ -136,7 +136,8 @@ class phpbb_content_visibility_get_global_visibility_sql_test extends phpbb_data
->will($this->returnValueMap($permissions));
$user = new \phpbb\user('\phpbb\datetime');
$config = new phpbb\config\config(array());
- $content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+ $phpbb_dispatcher = $this->getMock('\phpbb\event\dispatcher');
+ $content_visibility = new \phpbb\content_visibility($auth, $config, $phpbb_dispatcher, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
$result = $db->sql_query('SELECT ' . $mode . '_id
FROM ' . $table . '
diff --git a/tests/content_visibility/get_visibility_sql_test.php b/tests/content_visibility/get_visibility_sql_test.php
index f718e6c29a..5e3e345543 100644
--- a/tests/content_visibility/get_visibility_sql_test.php
+++ b/tests/content_visibility/get_visibility_sql_test.php
@@ -83,7 +83,8 @@ class phpbb_content_visibility_get_visibility_sql_test extends phpbb_database_te
->will($this->returnValueMap($permissions));
$user = new \phpbb\user('\phpbb\datetime');
$config = new phpbb\config\config(array());
- $content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+ $phpbb_dispatcher = $this->getMock('\phpbb\event\dispatcher');
+ $content_visibility = new \phpbb\content_visibility($auth, $config, $phpbb_dispatcher, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
$result = $db->sql_query('SELECT ' . $mode . '_id
FROM ' . $table . '
diff --git a/tests/content_visibility/set_post_visibility_test.php b/tests/content_visibility/set_post_visibility_test.php
index ab79fbc2ee..8cb14312ef 100644
--- a/tests/content_visibility/set_post_visibility_test.php
+++ b/tests/content_visibility/set_post_visibility_test.php
@@ -126,7 +126,8 @@ class phpbb_content_visibility_set_post_visibility_test extends phpbb_database_t
$auth = $this->getMock('\phpbb\auth\auth');
$user = new \phpbb\user('\phpbb\datetime');
$config = new phpbb\config\config(array());
- $content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+ $phpbb_dispatcher = $this->getMock('\phpbb\event\dispatcher');
+ $content_visibility = new \phpbb\content_visibility($auth, $config, $phpbb_dispatcher, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
$content_visibility->set_post_visibility($visibility, $post_id, $topic_id, $forum_id, $user_id, $time, $reason, $is_starter, $is_latest);
diff --git a/tests/content_visibility/set_topic_visibility_test.php b/tests/content_visibility/set_topic_visibility_test.php
index 4d02a55490..f679b03b82 100644
--- a/tests/content_visibility/set_topic_visibility_test.php
+++ b/tests/content_visibility/set_topic_visibility_test.php
@@ -90,7 +90,8 @@ class phpbb_content_visibility_set_topic_visibility_test extends phpbb_database_
$auth = $this->getMock('\phpbb\auth\auth');
$user = new \phpbb\user('\phpbb\datetime');
$config = new phpbb\config\config(array());
- $content_visibility = new \phpbb\content_visibility($auth, $config, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+ $phpbb_dispatcher = $this->getMock('\phpbb\event\dispatcher');
+ $content_visibility = new \phpbb\content_visibility($auth, $config, $phpbb_dispatcher, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
$content_visibility->set_topic_visibility($visibility, $topic_id, $forum_id, $user_id, $time, $reason, $force_update_all);