aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions_user/delete_user_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functions_user/delete_user_test.php')
-rw-r--r--tests/functions_user/delete_user_test.php25
1 files changed, 15 insertions, 10 deletions
diff --git a/tests/functions_user/delete_user_test.php b/tests/functions_user/delete_user_test.php
index 09ed51890c..4a82a0eeb7 100644
--- a/tests/functions_user/delete_user_test.php
+++ b/tests/functions_user/delete_user_test.php
@@ -19,13 +19,18 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/delete_user.xml');
}
- protected function setUp()
+ protected function setUp(): void
{
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',
@@ -59,16 +64,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,
@@ -77,8 +82,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,
@@ -87,9 +92,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' => ''),
),
),