diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/ucp_profile_test.php | 6 | ||||
-rw-r--r-- | tests/profilefields/type_string_test.php | 12 |
2 files changed, 16 insertions, 2 deletions
diff --git a/tests/functional/ucp_profile_test.php b/tests/functional/ucp_profile_test.php index 8003640e76..46b67ff843 100644 --- a/tests/functional/ucp_profile_test.php +++ b/tests/functional/ucp_profile_test.php @@ -25,9 +25,10 @@ class phpbb_functional_ucp_profile_test extends phpbb_functional_test_case $this->assertContainsLang('UCP_PROFILE_PROFILE_INFO', $crawler->filter('#cp-main h2')->text()); $form = $crawler->selectButton('Submit')->form(array( - 'pf_phpbb_facebook' => 'phpbb', + 'pf_phpbb_facebook' => 'phpbb', 'pf_phpbb_location' => 'BertieĀ“s Empire', - 'pf_phpbb_twitter' => 'phpbb_twitter', + 'pf_phpbb_skype' => 'phpbb.skype.account', + 'pf_phpbb_twitter' => 'phpbb_twitter', )); $crawler = self::submit($form); @@ -38,6 +39,7 @@ class phpbb_functional_ucp_profile_test extends phpbb_functional_test_case $this->assertEquals('phpbb', $form->get('pf_phpbb_facebook')->getValue()); $this->assertEquals('BertieĀ“s Empire', $form->get('pf_phpbb_location')->getValue()); + $this->assertEquals('phpbb.skype.account', $form->get('pf_phpbb_skype')->getValue()); $this->assertEquals('phpbb_twitter', $form->get('pf_phpbb_twitter')->getValue()); } } diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index 97d024fbaa..cee8a1d863 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -155,6 +155,18 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case 'FIELD_INVALID_CHARS_ALPHA_DOTS-field', 'Required field should reject field with comma', ), + 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', + ), ); } |