From dcab0762210a4059cca7458344dcc1aeb0360c42 Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 29 Dec 2019 02:12:36 +0700 Subject: [ticket/16276] Further fix PHP nightly tests PHPBB3-16276 --- tests/functions_user/delete_user_test.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'tests/functions_user/delete_user_test.php') diff --git a/tests/functions_user/delete_user_test.php b/tests/functions_user/delete_user_test.php index c112a0c368..4a82a0eeb7 100644 --- a/tests/functions_user/delete_user_test.php +++ b/tests/functions_user/delete_user_test.php @@ -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', @@ -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' => ''), ), ), -- cgit v1.2.1