aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2019-12-29 02:12:36 +0700
committerrxu <rxu@mail.ru>2019-12-29 12:59:24 +0700
commitdcab0762210a4059cca7458344dcc1aeb0360c42 (patch)
treefbae8ee0429f1c6ebb29cd8af8c5f3d1d7450ea4 /tests/functions
parent82e61f501abfa2768d7faac1ccd8d688c84e5e13 (diff)
downloadforums-dcab0762210a4059cca7458344dcc1aeb0360c42.tar
forums-dcab0762210a4059cca7458344dcc1aeb0360c42.tar.gz
forums-dcab0762210a4059cca7458344dcc1aeb0360c42.tar.bz2
forums-dcab0762210a4059cca7458344dcc1aeb0360c42.tar.xz
forums-dcab0762210a4059cca7458344dcc1aeb0360c42.zip
[ticket/16276] Further fix PHP nightly tests
PHPBB3-16276
Diffstat (limited to 'tests/functions')
-rw-r--r--tests/functions/obtain_online_test.php1
-rw-r--r--tests/functions/validate_username_test.php4
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;