From fc6cb02e1fa02755a10d193bebd8f5ad0fa451ab Mon Sep 17 00:00:00 2001 From: Shitiz Garg Date: Fri, 20 Jun 2014 18:12:26 +0530 Subject: [PATCH] [ticket/12729] Add unit test for ALPHA_DOTS validation PHPBB3-12729 --- tests/profilefields/type_string_test.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index d9a7369b94..97d024fbaa 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -143,6 +143,18 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case false, 'Required field should accept a characters only field', ), + array( + 'Valid.Username123', + array('field_validation' => '[\w.]+'), + false, + 'Required field should accept a alphanumeric field with dots', + ), + array( + 'Invalid.,username123', + array('field_validation' => '[\w.]+'), + 'FIELD_INVALID_CHARS_ALPHA_DOTS-field', + 'Required field should reject field with comma', + ), ); }