diff options
author | rxu <rxu@mail.ru> | 2014-11-25 22:16:30 +0700 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2014-11-27 01:18:49 +0700 |
commit | a8c62e707af0971a62b7601f4ac6ea46f57b16c2 (patch) | |
tree | 48ccc14a1f33f722b2f3524ca3a4187e964de09c /tests/profilefields | |
parent | ee90d227c2b041df85fbbdc9cd1f99b23a858687 (diff) | |
download | forums-a8c62e707af0971a62b7601f4ac6ea46f57b16c2.tar forums-a8c62e707af0971a62b7601f4ac6ea46f57b16c2.tar.gz forums-a8c62e707af0971a62b7601f4ac6ea46f57b16c2.tar.bz2 forums-a8c62e707af0971a62b7601f4ac6ea46f57b16c2.tar.xz forums-a8c62e707af0971a62b7601f4ac6ea46f57b16c2.zip |
[ticket/12926] Support for IDN (IRI)
Add international domain name support for URLs.
PHPBB3-12926
Diffstat (limited to 'tests/profilefields')
-rw-r--r-- | tests/profilefields/type_url_test.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/profilefields/type_url_test.php b/tests/profilefields/type_url_test.php index 372c07418f..cc37f04f30 100644 --- a/tests/profilefields/type_url_test.php +++ b/tests/profilefields/type_url_test.php @@ -89,6 +89,32 @@ class phpbb_profilefield_type_url_test extends phpbb_test_case 'FIELD_INVALID_URL-field', 'Field should reject invalid URL having multi value parameters', ), + + // IDN url type profilefields + array( + 'http://www.täst.de', + array(), + false, + 'Field should accept valid IDN', + ), + array( + 'http://täst.de/index.html?param1=test¶m2=awesome', + array(), + false, + 'Field should accept valid IDN URL with params', + ), + array( + 'http://домен.рф/index.html/тест/path?document=get', + array(), + false, + 'Field should accept valid IDN URL', + ), + array( + 'http://домен.рф/index.html/тест/path?document[]=DocType%20test&document[]=AnotherDoc', + array(), + 'FIELD_INVALID_URL-field', + 'Field should reject invalid IDN URL having multi value parameters', + ), ); } @@ -119,6 +145,20 @@ class phpbb_profilefield_type_url_test extends phpbb_test_case 'http://example.com', 'Field should return correct raw value', ), + + // IDN tests + array( + 'http://täst.de', + array('field_show_novalue' => true), + 'http://täst.de', + 'Field should return the correct raw value', + ), + array( + 'http://домен.рф', + array('field_show_novalue' => false), + 'http://домен.рф', + 'Field should return correct raw value', + ), ); } |