aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions
diff options
context:
space:
mode:
author3D-I <marktravai@gmail.com>2019-04-01 23:12:55 +0200
committer3D-I <marktravai@gmail.com>2019-04-01 23:14:09 +0200
commit7160c67b2ca8fa1c819d5da3e629fb02621a7066 (patch)
tree3da51c9aab855282e16ad1af2f9f718d36aebd58 /tests/functions
parentb89044888275dac3ad7b139d6e9dc27c59cb3135 (diff)
downloadforums-7160c67b2ca8fa1c819d5da3e629fb02621a7066.tar
forums-7160c67b2ca8fa1c819d5da3e629fb02621a7066.tar.gz
forums-7160c67b2ca8fa1c819d5da3e629fb02621a7066.tar.bz2
forums-7160c67b2ca8fa1c819d5da3e629fb02621a7066.tar.xz
forums-7160c67b2ca8fa1c819d5da3e629fb02621a7066.zip
[ticket/16004] Add tests/functions/validate_username_test.php
PHPBB3-16004
Diffstat (limited to 'tests/functions')
-rw-r--r--tests/functions/validate_username_test.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/functions/validate_username_test.php b/tests/functions/validate_username_test.php
index d310f58036..cee5d38400 100644
--- a/tests/functions/validate_username_test.php
+++ b/tests/functions/validate_username_test.php
@@ -47,6 +47,7 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case
'foobar_letter_num' => array(),
'foobar_letter_num_sp' => array(),
'foobar_quot' => array('INVALID_CHARS'),
+ 'foobar_emoji' => array('INVALID_EMOJIS'),
'barfoo_disallow' => array('USERNAME_DISALLOWED'),
'admin_taken' => array('USERNAME_TAKEN'),
'group_taken' => array('USERNAME_TAKEN'),
@@ -60,6 +61,7 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case
'foobar_letter_num' => array(),
'foobar_letter_num_sp' => array('INVALID_CHARS'),
'foobar_quot' => array('INVALID_CHARS'),
+ 'foobar_emoji' => array('INVALID_EMOJIS'),
'barfoo_disallow' => array('USERNAME_DISALLOWED'),
'admin_taken' => array('USERNAME_TAKEN'),
'group_taken' => array('INVALID_CHARS'),
@@ -73,6 +75,7 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case
'foobar_letter_num' => array(),
'foobar_letter_num_sp' => array('INVALID_CHARS'),
'foobar_quot' => array('INVALID_CHARS'),
+ 'foobar_emoji' => array('INVALID_EMOJIS'),
'barfoo_disallow' => array('USERNAME_DISALLOWED'),
'admin_taken' => array('USERNAME_TAKEN'),
'group_taken' => array('USERNAME_TAKEN'),
@@ -86,6 +89,7 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case
'foobar_letter_num' => array(),
'foobar_letter_num_sp' => array('INVALID_CHARS'),
'foobar_quot' => array('INVALID_CHARS'),
+ 'foobar_emoji' => array('INVALID_EMOJIS'),
'barfoo_disallow' => array('USERNAME_DISALLOWED'),
'admin_taken' => array('USERNAME_TAKEN'),
'group_taken' => array('INVALID_CHARS'),
@@ -99,6 +103,7 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case
'foobar_letter_num' => array(),
'foobar_letter_num_sp' => array(),
'foobar_quot' => array('INVALID_CHARS'),
+ 'foobar_emoji' => array('INVALID_EMOJIS'),
'barfoo_disallow' => array('USERNAME_DISALLOWED'),
'admin_taken' => array('USERNAME_TAKEN'),
'group_taken' => array('USERNAME_TAKEN'),
@@ -112,6 +117,7 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case
'foobar_letter_num' => array(),
'foobar_letter_num_sp' => array('INVALID_CHARS'),
'foobar_quot' => array('INVALID_CHARS'),
+ 'foobar_emoji' => array('INVALID_EMOJIS'),
'barfoo_disallow' => array('USERNAME_DISALLOWED'),
'admin_taken' => array('USERNAME_TAKEN'),
'group_taken' => array('USERNAME_TAKEN'),
@@ -173,6 +179,11 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case
'"foobar"',
array('username'),
),
+ 'foobar_emoji' => array(
+ $expected['foobar_emoji'],
+ 'usernamešŸ˜®',
+ array('username'),
+ ),
'barfoo_disallow' => array(
$expected['barfoo_disallow'],
'barfoo',