summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2019-09-11 17:45:06 +0200
committerUrban Müller2019-09-11 17:45:06 +0200
commitb165f909a36748f0d749c250cdba3006ccd23105 (patch)
tree8827c9f5255e2e580c47632d2e5910e8f99d279f
parentb8465ac3e689a5d091c20cda91a3c1e6773a036a (diff)
downloaditools-b165f909a36748f0d749c250cdba3006ccd23105.tar.gz
itools-b165f909a36748f0d749c250cdba3006ccd23105.tar.bz2
itools-b165f909a36748f0d749c250cdba3006ccd23105.zip
add params2utf8 tests
-rwxr-xr-xtest/it.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/it.t b/test/it.t
index af11b94..cc3e9f2 100755
--- a/test/it.t
+++ b/test/it.t
@@ -481,3 +481,16 @@ is(ob_get_clean(), "aa");
it::file_put($tmpfile, "bb");
is(it::file_get($tmpfile), "bb");
unlink($tmpfile);
+
+requesturi(utf8_decode("lüönd"), "lüönd");
+requesturi(utf8_decode("ü").utf8_encode("ü"), "üü");
+requesturi(utf8_encode("müller"), "müller");
+requesturi(utf8_encode(utf8_encode("müller")), "müller");
+requesturi("I 💚 Nü York", "I 💚 Nü York");
+
+function requesturi($teststring, $expect)
+{
+ $_SERVER['REQUEST_URI'] = urlencode($teststring);
+ it::params2utf8();
+ is(urldecode($_SERVER['REQUEST_URI']), $expect, "parms2utf8('$expect')");
+}