mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-13 12:22:03 +02:00
[ticket/12662] Update tests that utilize get_username_string
PHPBB3-12662
This commit is contained in:
parent
419de00a9c
commit
665742945f
@ -128,19 +128,19 @@ class phpbb_functions_obtain_online_test extends phpbb_database_test_case
|
||||
{
|
||||
return array(
|
||||
array(0, false, array(
|
||||
'online_userlist' => 'REGISTERED_USERS 2, 3',
|
||||
'online_userlist' => 'REGISTERED_USERS <span class="username">2</span>, <span class="username">3</span>',
|
||||
'l_online_users' => 'ONLINE_USERS_TOTAL 5 REG_USERS_TOTAL 2 HIDDEN_USERS_TOTAL 3',
|
||||
)),
|
||||
array(0, true, array(
|
||||
'online_userlist' => 'REGISTERED_USERS 2, 3',
|
||||
'online_userlist' => 'REGISTERED_USERS <span class="username">2</span>, <span class="username">3</span>',
|
||||
'l_online_users' => 'ONLINE_USERS_TOTAL_GUESTS 7 REG_USERS_TOTAL 2 HIDDEN_USERS_TOTAL 3 GUEST_USERS_TOTAL 2',
|
||||
)),
|
||||
array(1, false, array(
|
||||
'online_userlist' => 'BROWSING_FORUM 3',
|
||||
'online_userlist' => 'BROWSING_FORUM <span class="username">3</span>',
|
||||
'l_online_users' => 'ONLINE_USERS_TOTAL 2 REG_USERS_TOTAL 1 HIDDEN_USERS_TOTAL 1',
|
||||
)),
|
||||
array(1, true, array(
|
||||
'online_userlist' => 'BROWSING_FORUM_GUESTS 1 3',
|
||||
'online_userlist' => 'BROWSING_FORUM_GUESTS 1 <span class="username">3</span>',
|
||||
'l_online_users' => 'ONLINE_USERS_TOTAL_GUESTS 3 REG_USERS_TOTAL 1 HIDDEN_USERS_TOTAL 1 GUEST_USERS_TOTAL 1',
|
||||
)),
|
||||
array(2, false, array(
|
||||
|
@ -94,11 +94,11 @@ class phpbb_functions_content_get_username_string_test extends phpbb_test_case
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
return array(
|
||||
array(0, '', '', false, false, 'Guest'),
|
||||
array(ANONYMOUS, 'Anonymous', '', false, false, 'Anonymous'),
|
||||
array(0, '', '', false, false, '<span class="username">Guest</span>'),
|
||||
array(ANONYMOUS, 'Anonymous', '', false, false, '<span class="username">Anonymous</span>'),
|
||||
array(2, 'Administrator', 'FF0000', false, false, '<a href="' . $phpbb_root_path . 'memberlist.' . $phpEx . '?mode=viewprofile&u=2" style="color: #FF0000;" class="username-coloured">Administrator</a>'),
|
||||
array(5, 'User5', '', false, 'http://www.example.org/user.php?mode=show', '<a href="http://www.example.org/user.php?mode=show&u=5">User5</a>'),
|
||||
array(8, 'Eight', '', false, false, '<a href="' . $phpbb_root_path . 'memberlist.php?mode=viewprofile&u=8">Eight</a>'),
|
||||
array(5, 'User5', '', false, 'http://www.example.org/user.php?mode=show', '<a href="http://www.example.org/user.php?mode=show&u=5" class="username">User5</a>'),
|
||||
array(8, 'Eight', '', false, false, '<a href="' . $phpbb_root_path . 'memberlist.php?mode=viewprofile&u=8" class="username">Eight</a>'),
|
||||
);
|
||||
}
|
||||
|
||||
@ -113,10 +113,10 @@ class phpbb_functions_content_get_username_string_test extends phpbb_test_case
|
||||
public function get_username_string_no_profile_data()
|
||||
{
|
||||
return array(
|
||||
array(ANONYMOUS, 'Anonymous', '', false, false, 'Anonymous'),
|
||||
array(ANONYMOUS, 'Anonymous', '', '', false, 'Guest'),
|
||||
array(ANONYMOUS, 'Anonymous', '', false, false, '<span class="username">Anonymous</span>'),
|
||||
array(ANONYMOUS, 'Anonymous', '', '', false, '<span class="username">Guest</span>'),
|
||||
array(2, 'Administrator', 'FF0000', false, false, '<span style="color: #FF0000;" class="username-coloured">Administrator</span>'),
|
||||
array(8, 'Eight', '', false, false, 'Eight'),
|
||||
array(8, 'Eight', '', false, false, '<span class="username">Eight</span>'),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
@ -59,7 +59,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
@ -78,7 +78,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
@ -97,7 +97,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
@ -118,7 +118,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
@ -139,7 +139,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
@ -160,7 +160,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
@ -177,11 +177,11 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'reportee_id' => 2,
|
||||
'reportee_username' => 'admin',
|
||||
'reportee_username_full'=> 'admin',
|
||||
'reportee_username_full'=> '<span class="username">admin</span>',
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
@ -196,11 +196,11 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'reportee_id' => 1,
|
||||
'reportee_username' => 'Anonymous',
|
||||
'reportee_username_full'=> 'Anonymous',
|
||||
'reportee_username_full'=> '<span class="username">Anonymous</span>',
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
@ -219,7 +219,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
@ -238,7 +238,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
||||
|
||||
'user_id' => 1,
|
||||
'username' => 'Anonymous',
|
||||
'username_full' => 'Anonymous',
|
||||
'username_full' => '<span class="username">Anonymous</span>',
|
||||
|
||||
'ip' => '127.0.0.1',
|
||||
'time' => 1,
|
||||
|
@ -86,7 +86,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
|
||||
array('username' => '', 'poster_id' => 3),
|
||||
),
|
||||
),
|
||||
'<strong>Reply</strong> from A and B in topic:',
|
||||
'<strong>Reply</strong> from A and <span class="username">B</span> in topic:',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
@ -98,7 +98,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
|
||||
array('username' => '', 'poster_id' => 4),
|
||||
),
|
||||
),
|
||||
'<strong>Reply</strong> from A, B, and C in topic:',
|
||||
'<strong>Reply</strong> from A, <span class="username">B</span>, and <span class="username">C</span> in topic:',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
@ -111,7 +111,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
|
||||
array('username' => '', 'poster_id' => 5),
|
||||
),
|
||||
),
|
||||
'<strong>Reply</strong> from A, B, C, and D in topic:',
|
||||
'<strong>Reply</strong> from A, <span class="username">B</span>, <span class="username">C</span>, and <span class="username">D</span> in topic:',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
@ -125,7 +125,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
|
||||
array('username' => '', 'poster_id' => 6),
|
||||
),
|
||||
),
|
||||
'<strong>Reply</strong> from A, B, C, and 2 others in topic:',
|
||||
'<strong>Reply</strong> from A, <span class="username">B</span>, <span class="username">C</span>, and 2 others in topic:',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user