"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:----EZ+h3lkTpffW1tO3CiTWwYWb7FLlLihTSSe9j/8E1GWL9FFwHeWI+NzNStClNc98lxUqPOF53x/ZOLvFL9xkENL5gpvlr2iO11l3+qiVnGOlXt+VWFDHuYLKoYnRnibrQmKMU0paYA8ygme29LbaAXNX9PctglDUm84tiKQJm1kdGTRaEcPDJL9Au+VYx+1BljRK7Zx/43wtYQuBuolCy+M5fZ3h/+y3XNpAkPjQHF4rDkrUA4eZq77no9Ld0RJuQuTQqVpEdbZmZf3IByK9v8UVj3L5kzgaOzX5hPe0OoGdMQbIYU4Ck9bN0vTUvbXUkgQiuVFmWnvaBh2VoJ2YC0wzT9sWcQT13PbDnCDJx2RHft7ycATah5C8OI7bhoEzMipph/qw5BIi9nES84XyRxynHUEZXhfZErRjg6Atp6o/5eleBE+XJhR0Q7gviIZsQe2IxQBtjgz7jwDEZW+um9ltzncwZj69keE5Ppc71kz0h6QxaNBD+aaU+cJxQid6nr+Hx84FiBti+8d9mAr6VRTeeoQQNTqyn54pzMoOipbwWHRMQEmvrkw0B3TiTdG9KVIHYughh8E6/4Sjd67CT2v3TFxDJuTX5Ye9K/3T55EbLRaI0uLqTT95ggCsSiFCwtPpE0MXHhsHi5Z1Hw5nrSfYK8CDRGad5OwjGBtwxHc=----ATTACHMENT:----NjQ1ODk5NzAxNzA1MzU5OCA0MDM1MjE3NjkyMDU0ODY3IDE0NTY4OTQ0MjQyMDI4ODY=