aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPayBas <contact@paybas.com>2014-06-25 09:33:48 +0200
committerPayBas <contact@paybas.com>2014-06-25 14:19:09 +0200
commit665742945f37a11a84ff3dc7190607a048fee485 (patch)
tree2428aa9d6784d567194de9ffe1df24caf5d9eadb /tests
parent419de00a9cfcf195842050e83fcfbc54fd8fd54d (diff)
downloadforums-665742945f37a11a84ff3dc7190607a048fee485.tar
forums-665742945f37a11a84ff3dc7190607a048fee485.tar.gz
forums-665742945f37a11a84ff3dc7190607a048fee485.tar.bz2
forums-665742945f37a11a84ff3dc7190607a048fee485.tar.xz
forums-665742945f37a11a84ff3dc7190607a048fee485.zip
[ticket/12662] Update tests that utilize get_username_string
PHPBB3-12662
Diffstat (limited to 'tests')
-rw-r--r--tests/functions/obtain_online_test.php8
-rw-r--r--tests/functions_content/get_username_string_test.php14
-rw-r--r--tests/log/function_view_log_test.php26
-rw-r--r--tests/notification/user_list_trim_test.php8
4 files changed, 28 insertions, 28 deletions
diff --git a/tests/functions/obtain_online_test.php b/tests/functions/obtain_online_test.php
index 830b52fb4c..e793a4eb82 100644
--- a/tests/functions/obtain_online_test.php
+++ b/tests/functions/obtain_online_test.php
@@ -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(
diff --git a/tests/functions_content/get_username_string_test.php b/tests/functions_content/get_username_string_test.php
index 502796d1df..01ec97f6a4 100644
--- a/tests/functions_content/get_username_string_test.php
+++ b/tests/functions_content/get_username_string_test.php
@@ -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&amp;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&amp;u=5">User5</a>'),
- array(8, 'Eight', '', false, false, '<a href="' . $phpbb_root_path . 'memberlist.php?mode=viewprofile&amp;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&amp;u=5" class="username">User5</a>'),
+ array(8, 'Eight', '', false, false, '<a href="' . $phpbb_root_path . 'memberlist.php?mode=viewprofile&amp;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>'),
);
}
diff --git a/tests/log/function_view_log_test.php b/tests/log/function_view_log_test.php
index b7e60c7393..02e0b3912f 100644
--- a/tests/log/function_view_log_test.php
+++ b/tests/log/function_view_log_test.php
@@ -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,
diff --git a/tests/notification/user_list_trim_test.php b/tests/notification/user_list_trim_test.php
index 85d8961e82..851c9ec221 100644
--- a/tests/notification/user_list_trim_test.php
+++ b/tests/notification/user_list_trim_test.php
@@ -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:',
),
);
}