aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions/validate_username_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functions/validate_username_test.php')
-rw-r--r--tests/functions/validate_username_test.php4
1 files changed, 3 insertions, 1 deletions
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;