diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-01-10 12:36:49 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-01-10 12:36:49 +0100 |
commit | 67c987f0d06cb0898d2589c7bc12fceb4e142d68 (patch) | |
tree | 7e28f84d31403cac05e5b3e8e36e8e48aab34cd0 /tests | |
parent | bf59d8dd746578dac4f239cbbce5885acfadaefd (diff) | |
parent | 1145af71bf08519b389ab57600d855689664ecfc (diff) | |
download | forums-67c987f0d06cb0898d2589c7bc12fceb4e142d68.tar forums-67c987f0d06cb0898d2589c7bc12fceb4e142d68.tar.gz forums-67c987f0d06cb0898d2589c7bc12fceb4e142d68.tar.bz2 forums-67c987f0d06cb0898d2589c7bc12fceb4e142d68.tar.xz forums-67c987f0d06cb0898d2589c7bc12fceb4e142d68.zip |
Merge pull request #3166 from nickvergessen/Senky-ticket/12866
[ticket/12866] Wrong profile field validation options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/profilefields/type_string_test.php | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index a7be087fb5..0417afbfab 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -133,37 +133,49 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case ), array( 'ö äö äö ä', - array('field_validation' => '[\w]+'), + array('field_validation' => '[a-zA-Z0-9]+'), 'FIELD_INVALID_CHARS_ALPHA_ONLY-field', 'Required field should reject UTF-8 in alpha only field', ), array( + 'a_abc', + array('field_validation' => '[a-zA-Z0-9]+'), + 'FIELD_INVALID_CHARS_ALPHA_ONLY-field', + 'Required field should reject underscore in alpha only field', + ), + array( 'Hello', - array('field_validation' => '[\w]+'), + array('field_validation' => '[a-zA-Z0-9]+'), false, 'Required field should accept a characters only field', ), array( 'Valid.Username123', - array('field_validation' => '[\w.]+'), + array('field_validation' => '[a-zA-Z0-9.]+'), false, 'Required field should accept a alphanumeric field with dots', ), array( 'Invalid.,username123', - array('field_validation' => '[\w.]+'), + array('field_validation' => '[a-zA-Z0-9.]+'), 'FIELD_INVALID_CHARS_ALPHA_DOTS-field', 'Required field should reject field with comma', ), array( + 'Invalid._username123', + array('field_validation' => '[a-zA-Z0-9.]+'), + 'FIELD_INVALID_CHARS_ALPHA_DOTS-field', + 'Required field should reject field with underscore', + ), + array( 'skype.test.name,_this', - array('field_validation' => '[a-zA-Z][\w\.,\-_]+'), + 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\.,\-_]+'), + 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', ), |