summaryrefslogtreecommitdiff
path: root/test/it.t
diff options
context:
space:
mode:
authorUrban Müller2019-01-18 15:15:02 +0100
committerUrban Müller2019-01-18 15:15:31 +0100
commit9d2855caff4ccad0e6370bb1bf2770f185238b60 (patch)
tree36470472353ff5c3e1a4945e59e52e959043f469 /test/it.t
parent2a2ba78a71918f86e94c3a21fc52e8cdfdb52b68 (diff)
downloaditools-9d2855caff4ccad0e6370bb1bf2770f185238b60.tar.gz
itools-9d2855caff4ccad0e6370bb1bf2770f185238b60.tar.bz2
itools-9d2855caff4ccad0e6370bb1bf2770f185238b60.zip
test assoc flag
Diffstat (limited to 'test/it.t')
-rwxr-xr-xtest/it.t3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/it.t b/test/it.t
index fcc68e7..fdaef6c 100755
--- a/test/it.t
+++ b/test/it.t
@@ -426,6 +426,9 @@ foreach ([ 'a' => 'ä', 'e' => 'ë', 'i' => 'ï', 'o' => 'ö', 'u' => 'ü' ] as
foreach (array($dummy, false, true, null, 1, "a", "Ä", "/", array()) as $var)
is(it::json_decode(it::json_encode($var)), $var);
+is(it::json_decode('{"foo":"bar"}')->foo, "bar");
+is(it::json_decode('{"foo":"bar"}', ['assoc' => true])['foo'], "bar");
+
is(it::sort(array("2!","19!","1!")), array("1!", "19!", "2!"));
is(it::sort(array("2!","19!","1!"), "r"), array("2!", "19!", "1!"));