diff options
Diffstat (limited to 'tests/functions')
-rw-r--r-- | tests/functions/obtain_online_test.php | 1 | ||||
-rw-r--r-- | tests/functions/validate_username_test.php | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/functions/obtain_online_test.php b/tests/functions/obtain_online_test.php index f740decab8..e6929b1549 100644 --- a/tests/functions/obtain_online_test.php +++ b/tests/functions/obtain_online_test.php @@ -161,6 +161,7 @@ class phpbb_functions_obtain_online_test extends phpbb_database_test_case global $config, $user, $auth, $phpbb_dispatcher; $config['load_online_guests'] = $display_guests; $user = new phpbb_mock_lang(); + $user->data['user_id'] = 100; $user->lang = $this->load_language(); $auth = $this->createMock('\phpbb\auth\auth'); $acl_get_map = array( diff --git a/tests/functions/validate_username_test.php b/tests/functions/validate_username_test.php index 3a4b63b5e8..31837f015b 100644 --- a/tests/functions/validate_username_test.php +++ b/tests/functions/validate_username_test.php @@ -130,11 +130,13 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case */ public function test_validate_username($allow_name_chars, $expected) { - global $cache, $config, $db; + global $cache, $config, $db, $user; $db = $this->db; $cache = $this->cache; $cache->put('_disallowed_usernames', array('barfoo')); + $user = new phpbb_mock_user(); + $user->data['username_clean'] = 'username'; $config['allow_name_chars'] = $allow_name_chars; |