diff options
author | Urban Müller | 2019-09-11 17:45:06 +0200 |
---|---|---|
committer | Urban Müller | 2019-09-11 17:45:06 +0200 |
commit | b165f909a36748f0d749c250cdba3006ccd23105 (patch) | |
tree | 8827c9f5255e2e580c47632d2e5910e8f99d279f | |
parent | b8465ac3e689a5d091c20cda91a3c1e6773a036a (diff) | |
download | itools-b165f909a36748f0d749c250cdba3006ccd23105.tar.gz itools-b165f909a36748f0d749c250cdba3006ccd23105.tar.bz2 itools-b165f909a36748f0d749c250cdba3006ccd23105.zip |
add params2utf8 tests
-rwxr-xr-x | test/it.t | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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')"); +} |