coverage++
authorMichael Wallner <mike@php.net>
Wed, 12 Jan 2022 10:37:06 +0000 (11:37 +0100)
committerMichael Wallner <mike@php.net>
Wed, 12 Jan 2022 10:37:06 +0000 (11:37 +0100)
tests/serialize/basic.phpt

index 3b39e8619edc99f737be0cb842ff7e76c38edc39..57f90bba1248c1c68e5a38e5055e874370547804 100644 (file)
@@ -13,7 +13,8 @@ $data = [
        "double" => 123.123,
        "string" => "foobar",
        "object" => (object) ["prop" => "data"],
-       "list" => [1,2,3]
+       "list" => [1,2,3],
+       "hash" => ["foo" => "bar", 1 => 2],
 ];
 echo $s = ion\serialize($data), "\n";
 var_dump($data == ion\unserialize($s));
@@ -21,6 +22,6 @@ var_dump($data == ion\unserialize($s));
 DONE
 --EXPECTF--
 TEST
-{'null':null,'true':true,'false':false,int:123,double:12%f,string:"foobar",object:o::{prop:"data"},list:[1,2,3]}
+{'null':null,'true':true,'false':false,int:123,double:12%f,string:"foobar",object:o::{prop:"data"},list:[1,2,3],hash:{foo:"bar",'1':2}}
 bool(true)
 DONE