coverage++
[awesomized/ext-ion] / tests / serialize / basic.phpt
1 --TEST--
2 ion\serialize/basic
3 --EXTENSIONS--
4 ion
5 --FILE--
6 TEST
7 <?php
8 $data = [
9 "null" => null,
10 "true" => true,
11 "false" => false,
12 "int" => 123,
13 "double" => 123.123,
14 "string" => "foobar",
15 "object" => (object) ["prop" => "data"],
16 "list" => [1,2,3],
17 "hash" => ["foo" => "bar", 1 => 2],
18 ];
19 echo $s = ion\serialize($data), "\n";
20 var_dump($data == ion\unserialize($s));
21 ?>
22 DONE
23 --EXPECTF--
24 TEST
25 {'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}}
26 bool(true)
27 DONE