diff options
author | Shitiz Garg <mail@dragooon.net> | 2014-06-20 16:43:15 +0530 |
---|---|---|
committer | Shitiz Garg <mail@dragooon.net> | 2014-06-20 16:43:15 +0530 |
commit | 9b85e4b1417cb42a1784bcf00c88a5880eab133a (patch) | |
tree | 0a63a060f13b6a54209101d94e8da141f38c03ac /tests/profilefields | |
parent | 352f3b7e78f4020c7ce726981f3faef8cc8f33dc (diff) | |
download | forums-9b85e4b1417cb42a1784bcf00c88a5880eab133a.tar forums-9b85e4b1417cb42a1784bcf00c88a5880eab133a.tar.gz forums-9b85e4b1417cb42a1784bcf00c88a5880eab133a.tar.bz2 forums-9b85e4b1417cb42a1784bcf00c88a5880eab133a.tar.xz forums-9b85e4b1417cb42a1784bcf00c88a5880eab133a.zip |
[ticket/12732] Add unit tests for ALPHA_PUNCTUATION
PHPBB3-12732
Diffstat (limited to 'tests/profilefields')
-rw-r--r-- | tests/profilefields/type_string_test.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index d9a7369b94..8db89bd709 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( + 'skype.test.name,_this', + array('field_validation' => '[a-zA-Z][\w\.,\-_]+'), + false, + 'Required field should accept alphanumeric field with punctuations', + ), + array( + '1skype.this.should.faila', + array('field_validation' => '[a-zA-Z][\w\.,\-_]+'), + 'FIELD_INVALID_CHARS_ALPHA_PUNCTUATION-field', + 'Required field should reject field having invalid input for the given validation', + ), ); } |