From 9b85e4b1417cb42a1784bcf00c88a5880eab133a Mon Sep 17 00:00:00 2001 From: Shitiz Garg Date: Fri, 20 Jun 2014 16:43:15 +0530 Subject: [ticket/12732] Add unit tests for ALPHA_PUNCTUATION PHPBB3-12732 --- tests/profilefields/type_string_test.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/profilefields') 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', + ), ); } -- cgit v1.2.1