diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/ucp_profile_test.php | 2 | ||||
-rw-r--r-- | tests/profilefields/type_string_test.php | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/functional/ucp_profile_test.php b/tests/functional/ucp_profile_test.php index ea08eece78..2cc279eccc 100644 --- a/tests/functional/ucp_profile_test.php +++ b/tests/functional/ucp_profile_test.php @@ -26,6 +26,7 @@ class phpbb_functional_ucp_profile_test extends phpbb_functional_test_case $form = $crawler->selectButton('Submit')->form(array( 'pf_phpbb_location' => 'Bertie“s Empire', + 'pf_phpbb_facebook' => 'phpbb', )); $crawler = self::submit($form); $this->assertContainsLang('PROFILE_UPDATED', $crawler->filter('#message')->text()); @@ -33,5 +34,6 @@ class phpbb_functional_ucp_profile_test extends phpbb_functional_test_case $crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info'); $form = $crawler->selectButton('Submit')->form(); $this->assertEquals('Bertie“s Empire', $form->get('pf_phpbb_location')->getValue()); + $this->assertEquals('phpbb', $form->get('pf_phpbb_facebook')->getValue()); } } 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', + ), ); } |