aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions/validate_username_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-12-29 15:11:23 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-12-29 15:11:23 +0100
commit71a1c9fee7aaf3f92e934302abd121d75d4c5df2 (patch)
treee17dcc9b8477c68182e166f52db970f49f7c201a /tests/functions/validate_username_test.php
parent94808e2cbc880aa16212aa24c7dd7e94bf511305 (diff)
parentdcab0762210a4059cca7458344dcc1aeb0360c42 (diff)
downloadforums-71a1c9fee7aaf3f92e934302abd121d75d4c5df2.tar
forums-71a1c9fee7aaf3f92e934302abd121d75d4c5df2.tar.gz
forums-71a1c9fee7aaf3f92e934302abd121d75d4c5df2.tar.bz2
forums-71a1c9fee7aaf3f92e934302abd121d75d4c5df2.tar.xz
forums-71a1c9fee7aaf3f92e934302abd121d75d4c5df2.zip
Merge pull request #5796 from rxu/ticket/16276
[ticket/16276] Fix bbcode_firstpass undefined mode property
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;