"value", "key2" => "value2" ]; $formatter = new JsonFormatter(); $this->assertEquals('{"key1":"value","key2":"value2"}', $formatter->process($array)); } public function testObjectFormatter() { $object = new SampleModel(); $object->Id = "10"; $object->setName("Joao"); $formatter = new JsonFormatter(); $this->assertEquals('{"Id":"10","Name":"Joao"}', $formatter->process($object->toArray())); $this->assertEquals('{"Id":"10","Name":"Joao"}', $formatter->process($object)); } public function testObjectList() { $object = new ModelList3(); $object->addItem(new ModelGetter(10, "John")); $object->addItem(new ModelGetter(20, "Doe")); $formatter = new JsonFormatter(); $this->assertEquals('{"collection":[{"Id":10,"Name":"John"},{"Id":20,"Name":"Doe"}]}', $formatter->process($object)); $this->assertEquals('[{"Id":10,"Name":"John"},{"Id":20,"Name":"Doe"}]', $formatter->process(SerializerObject::instance($object->getCollection())->serialize())); } } __halt_compiler();----SIGNATURE:----Z9I8y+2dvpSs8wHd0iICUgCo0llscT6ExaPlDgAFzFuL/6K77UcZIoCxqJVGLYkQ22OjH35/wPADMMDUA2iw1rvJVv0GtCNVElFMC6poTFFzXAIABtgX+MBEcFWxhLsRfPDhvaZShC+ymlDsxo+ZlnJeh6z5kajJ2HuzavnsgQKt679yKRa59Pfs5XHen/Kd7RARDm5XTs4ZV6x3VzvmbygbL4qWt6s7dS0Y1EPgkSxRcPU/PdbAmsLpZLe0FzUo7OY4XU14fQjpMwLo9ifGicvztfOIN1as2CiF0GATEx0AcernMsX/ocr6S2SeA5Ok+FHgszYjg/cVHXAHAX5IwHHIT7W9XOKB8YD9rAVWX8rMFNZ2V3iWmcyVMaSI5bRgamApvpYMwIg+b52h7K7/nCnHYddLypSJvnv3XBg4loR4cx/hagpJQaJpqo/JN4uZpfZoR17rsRJjDY7J3Cb45Hldav0C/Z21mAYucavqujz4Wzj/wpndqIVuwIPfcB/LyfyVm7NBsojI4zi+0ejAs8Km29C+cDkQX+Xne7b5meGZ87C6amAcXMMVWmeIEDlblhvCGsSX64AIZOSwTvFtU07ikPsA24Ndx7NhC1WoXAFw/0ReSwzOZleHKs/MHol/FlXZ7qlc6yZe45zEtONaRBTCRYyRObKaaaD3I9e7L0I=----ATTACHMENT:----NDE0MzE0MTk4NDIyNjY3MCA2MDc3NzY1MTM5NDA0OTQgMTcyNDc3NDcxNTk3Mzg2MQ==