From 9d2855caff4ccad0e6370bb1bf2770f185238b60 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Fri, 18 Jan 2019 15:15:02 +0100 Subject: test assoc flag --- test/it.t | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') 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!")); -- cgit v1.2.3