diff options
author | Urban Müller | 2019-01-18 15:15:02 +0100 |
---|---|---|
committer | Urban Müller | 2019-01-18 15:15:31 +0100 |
commit | 9d2855caff4ccad0e6370bb1bf2770f185238b60 (patch) | |
tree | 36470472353ff5c3e1a4945e59e52e959043f469 | |
parent | 2a2ba78a71918f86e94c3a21fc52e8cdfdb52b68 (diff) | |
download | itools-9d2855caff4ccad0e6370bb1bf2770f185238b60.tar.gz itools-9d2855caff4ccad0e6370bb1bf2770f185238b60.tar.bz2 itools-9d2855caff4ccad0e6370bb1bf2770f185238b60.zip |
test assoc flag
-rwxr-xr-x | test/it.t | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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!")); |