diff options
author | Urban Müller | 2014-10-01 18:46:14 +0200 |
---|---|---|
committer | Urban Müller | 2014-10-01 18:51:00 +0200 |
commit | 95bb09069f31e99f5598cbceb3197f17c70ae919 (patch) | |
tree | 9d31a0bba317eb194c6a6e0e6c1aa520687a0c9f /tests/it.t | |
parent | 33e8695833b94fd1c83e37d7c7de9ced4edbb673 (diff) | |
download | itools-95bb09069f31e99f5598cbceb3197f17c70ae919.tar.gz itools-95bb09069f31e99f5598cbceb3197f17c70ae919.tar.bz2 itools-95bb09069f31e99f5598cbceb3197f17c70ae919.zip |
it::json_encode() and it::json_decode()
Diffstat (limited to 'tests/it.t')
-rwxr-xr-x | tests/it.t | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -389,3 +389,6 @@ is(it::any2utf8("a💚b"), "a💚b", "it::any2utf8 correctly handles 4-byte utf- is(it::any2utf8(array("foo", utf8_decode("bär"))), array("foo", "bär"), "any2utf8 on arrays"); is(it::any2utf8(array("foo", array(utf8_decode("bär")))), array("foo", array("bär")), "any2utf8 on recursive arrays"); is(it::any2utf8(array(1, true, false, null)), array(1, true, false, null), "any2utf8 should leave types alone"); + +foreach (array($dummy, false, true, null, 1, "a", "Ä", "/", array()) as $var) + is(it::json_decode(it::json_encode($var)), $var); |