From a8c62e707af0971a62b7601f4ac6ea46f57b16c2 Mon Sep 17 00:00:00 2001 From: rxu Date: Tue, 25 Nov 2014 22:16:30 +0700 Subject: [ticket/12926] Support for IDN (IRI) Add international domain name support for URLs. PHPBB3-12926 --- tests/profilefields/type_url_test.php | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'tests/profilefields') 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', + ), ); } -- cgit v1.2.1