1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander
2019-12-29 15:11:29 +01:00
17 changed files with 43 additions and 20 deletions

View File

@@ -23,9 +23,14 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
{
parent::setUp();
global $cache, $config, $db, $phpbb_dispatcher, $phpbb_container, $phpbb_root_path;
global $cache, $config, $db, $user, $phpbb_dispatcher, $phpbb_container, $phpbb_root_path, $phpEx;
$db = $this->db = $this->new_dbal();
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
$lang = new \phpbb\language\language($lang_loader);
$user = new \phpbb\user($lang, '\phpbb\datetime');
$config = new \phpbb\config\config(array(
'load_online_time' => 5,
'search_type' => '\phpbb\search\fulltext_mysql',
@@ -62,16 +67,16 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
array(
'retain', false,
array(
array('post_id' => 1, 'poster_id' => ANONYMOUS, 'post_username' => ''),
array('post_id' => 1, 'poster_id' => ANONYMOUS, 'post_username' => 'Guest'),
array('post_id' => 2, 'poster_id' => ANONYMOUS, 'post_username' => 'Other'),
array('post_id' => 3, 'poster_id' => ANONYMOUS, 'post_username' => ''),
array('post_id' => 3, 'poster_id' => ANONYMOUS, 'post_username' => 'Guest'),
array('post_id' => 4, 'poster_id' => ANONYMOUS, 'post_username' => 'Other'),
),
array(
array(
'topic_id' => 1,
'topic_poster' => ANONYMOUS, 'topic_first_poster_name' => '', 'topic_first_poster_colour' => '',
'topic_last_poster_id' => ANONYMOUS, 'topic_last_poster_name' => '', 'topic_last_poster_colour' => '',
'topic_poster' => ANONYMOUS, 'topic_first_poster_name' => 'Guest', 'topic_first_poster_colour' => '',
'topic_last_poster_id' => ANONYMOUS, 'topic_last_poster_name' => 'Guest', 'topic_last_poster_colour' => '',
),
array(
'topic_id' => 2,
@@ -80,8 +85,8 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
),
array(
'topic_id' => 3,
'topic_poster' => ANONYMOUS, 'topic_first_poster_name' => '', 'topic_first_poster_colour' => '',
'topic_last_poster_id' => ANONYMOUS, 'topic_last_poster_name' => '', 'topic_last_poster_colour' => '',
'topic_poster' => ANONYMOUS, 'topic_first_poster_name' => 'Guest', 'topic_first_poster_colour' => '',
'topic_last_poster_id' => ANONYMOUS, 'topic_last_poster_name' => 'Guest', 'topic_last_poster_colour' => '',
),
array(
'topic_id' => 4,
@@ -90,9 +95,9 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
),
),
array(
array('forum_id' => 1, 'forum_last_poster_id' => ANONYMOUS, 'forum_last_poster_name' => '', 'forum_last_poster_colour' => ''),
array('forum_id' => 1, 'forum_last_poster_id' => ANONYMOUS, 'forum_last_poster_name' => 'Guest', 'forum_last_poster_colour' => ''),
array('forum_id' => 2, 'forum_last_poster_id' => ANONYMOUS, 'forum_last_poster_name' => 'Other', 'forum_last_poster_colour' => ''),
array('forum_id' => 3, 'forum_last_poster_id' => ANONYMOUS, 'forum_last_poster_name' => '', 'forum_last_poster_colour' => ''),
array('forum_id' => 3, 'forum_last_poster_id' => ANONYMOUS, 'forum_last_poster_name' => 'Guest', 'forum_last_poster_colour' => ''),
array('forum_id' => 4, 'forum_last_poster_id' => ANONYMOUS, 'forum_last_poster_name' => 'Other', 'forum_last_poster_colour' => ''),
),
),

View File

@@ -131,6 +131,7 @@ class phpbb_functions_user_group_user_attributes_test extends phpbb_database_tes
$user = new phpbb_mock_user;
$user->ip = '';
$user->data['user_id'] = $user_id;
$cache = new phpbb_mock_cache;
$db = $this->new_dbal();
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();