diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-06-07 14:48:50 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-06-07 14:48:50 +0200 |
commit | d39ed5afc13285c1d6d14ea0d04be87dd11f7d38 (patch) | |
tree | efd1644a9b933c83948503a86360f654bd183cd9 /tests/functions | |
parent | ba665412ea4342da24b70408335e82a8c455f258 (diff) | |
download | forums-d39ed5afc13285c1d6d14ea0d04be87dd11f7d38.tar forums-d39ed5afc13285c1d6d14ea0d04be87dd11f7d38.tar.gz forums-d39ed5afc13285c1d6d14ea0d04be87dd11f7d38.tar.bz2 forums-d39ed5afc13285c1d6d14ea0d04be87dd11f7d38.tar.xz forums-d39ed5afc13285c1d6d14ea0d04be87dd11f7d38.zip |
[ticket/11543] Add more users so #hidden <> #normal
PHPBB3-11543
Diffstat (limited to 'tests/functions')
-rw-r--r-- | tests/functions/fixtures/obtain_online.xml | 10 | ||||
-rw-r--r-- | tests/functions/obtain_online_test.php | 21 |
2 files changed, 21 insertions, 10 deletions
diff --git a/tests/functions/fixtures/obtain_online.xml b/tests/functions/fixtures/obtain_online.xml index 1c5a4454f2..05bbe6a05e 100644 --- a/tests/functions/fixtures/obtain_online.xml +++ b/tests/functions/fixtures/obtain_online.xml @@ -107,5 +107,15 @@ <value></value> <value></value> </row> + <row> + <value>10</value> + <value>10</value> + <value>10</value> + <value>0</value> + <value></value> + <value></value> + <value></value> + <value></value> + </row> </table> </dataset> diff --git a/tests/functions/obtain_online_test.php b/tests/functions/obtain_online_test.php index 941c20de92..b3beb55a96 100644 --- a/tests/functions/obtain_online_test.php +++ b/tests/functions/obtain_online_test.php @@ -54,19 +54,19 @@ class phpbb_functions_obtain_online_test extends phpbb_database_test_case { return array( array(0, false, array( - 'online_users' => array(2 => 2, 3 => 3, 6 => 6, 7 => 7), - 'hidden_users' => array(6 => 6, 7 => 7), - 'total_online' => 4, + 'online_users' => array(2 => 2, 3 => 3, 6 => 6, 7 => 7, 10 => 10), + 'hidden_users' => array(6 => 6, 7 => 7, 10 => 10), + 'total_online' => 5, 'visible_online' => 2, - 'hidden_online' => 2, + 'hidden_online' => 3, 'guests_online' => 0, )), array(0, true, array( - 'online_users' => array(2 => 2, 3 => 3, 6 => 6, 7 => 7), - 'hidden_users' => array(6 => 6, 7 => 7), - 'total_online' => 6, + 'online_users' => array(2 => 2, 3 => 3, 6 => 6, 7 => 7, 10 => 10), + 'hidden_users' => array(6 => 6, 7 => 7, 10 => 10), + 'total_online' => 7, 'visible_online' => 2, - 'hidden_online' => 2, + 'hidden_online' => 3, 'guests_online' => 2, )), array(1, false, array( @@ -125,11 +125,11 @@ class phpbb_functions_obtain_online_test extends phpbb_database_test_case return array( array(0, false, array( 'online_userlist' => 'REGISTERED_USERS 2, 3', - 'l_online_users' => 'ONLINE_USERS_TOTAL 4REG_USERS_TOTAL_AND 2HIDDEN_USERS_TOTAL 2', + 'l_online_users' => 'ONLINE_USERS_TOTAL 5REG_USERS_TOTAL_AND 2HIDDEN_USERS_TOTAL 3', )), array(0, true, array( 'online_userlist' => 'REGISTERED_USERS 2, 3', - 'l_online_users' => 'ONLINE_USERS_TOTAL 6REG_USERS_TOTAL 2HIDDEN_USERS_TOTAL_AND 2GUEST_USERS_TOTAL 2', + 'l_online_users' => 'ONLINE_USERS_TOTAL 7REG_USERS_TOTAL 2HIDDEN_USERS_TOTAL_AND 3GUEST_USERS_TOTAL 2', )), array(1, false, array( 'online_userlist' => 'BROWSING_FORUM 3', @@ -196,6 +196,7 @@ class phpbb_functions_obtain_online_test extends phpbb_database_test_case $this->add_session(7, '0006', '192.168.0.10', 1, false, $time); $this->add_session(8, '0007', '192.168.0.11', 0, false, $time, 10); $this->add_session(9, '0008', '192.168.0.12', 1, false, $time, 10); + $this->add_session(10, '009', '192.168.0.13', 0, false, $time); } protected function add_session($user_id, $session_id, $user_ip, $forum_id, $view_online, $time, $time_delta = 0) |