From 95bb09069f31e99f5598cbceb3197f17c70ae919 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 1 Oct 2014 18:46:14 +0200 Subject: it::json_encode() and it::json_decode() --- tests/it.t | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/it.t b/tests/it.t index 4cf61c1..673b2d7 100755 --- a/tests/it.t +++ b/tests/it.t @@ -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); -- cgit v1.2.3