"value",
"key2" => "value2"
];
$formatter = new XmlFormatter();
$this->assertEquals("\nvaluevalue2\n", $formatter->process($array));
}
public function testObjectFormatter()
{
$object = new SampleModel();
$object->Id = "10";
$object->setName("Joao");
$formatter = new XmlFormatter();
$this->assertEquals("\n10Joao\n", $formatter->process(SerializerObject::instance($object)->serialize()));
$this->assertEquals("\n10Joao\n", $formatter->withRootElement("test")->process($object));
}
public function testObjectList()
{
$object = new ModelList3();
$object->addItem(new ModelGetter(10, "John"));
$object->addItem(new ModelGetter(20, "Doe"));
$formatter = new XmlFormatter();
$this->assertEquals("\n10John20Doe\n", $formatter->withListElement("model")->withListElementSuffix()->process($object));
$formatter = new XmlFormatter();
$this->assertEquals("\n- 10John
- 20Doe
\n", $formatter->process(SerializerObject::instance($object->getCollection())->serialize()));
}
}
__halt_compiler();----SIGNATURE:----zyOqwFwlP9ZF1I+XdqWXzkfWeRRHew4xv51J33lLchSJCYb/0bR0Jn3c8pEQ0qce5jOfA49lk7qgv0g5zZWEgdw2xqFBXH5W9088l1ELUw5j4X+6C3EshwmUAgslO5bzaFhD4Nw7+FXQRGGuOw2skvPgTys+Kz/zgUjCqICargchNQtEdaEFHAUoiQuZp4GW8LLluYYt30k+VTbcWAMCLgTAlDM/FSu2TVOA2G/O+BQOb8iS/1hJ9gnJ476tPZXOzjgvogOmpImEDImfmaRfynnRu0SsKNTPfqIzEVC4YPHLeack4pqPONhNKv7ldd7F/NC8we4ouHnVI7j/tdOKdXmTZEgEPKqGSAwqkK3u9R1UTrbrAdfxSla2Li+SmoovdcdlOdzkDhKyCcluEy+4EIxP+H0mzn9qUR/XzMLWmjK/LfehR2eXPzeZqzZktHI8buSlMHrwYT6PabdJmXBY22tX2yLspuJ3bsPDyvvSfubpot4IF6+FPP6NF5JtC0YdnhR0ex5ly2t9ZDMNvkKUcahF62PihyTQIG5Y/trR5cu2wFeiDOZXh8h79q4+k53KzHt9ClLQBBiFKTbJQJY4EEyb2Wm4TKGRM1qoazXCKRO/NfibNxM47xS5kRHBTfFkVLSMW5Wwj1BHMNOaP5eGvyMm+x7IKxY8hv2uf7F63p0=----ATTACHMENT:----MzMyMzgxODcyMDQ5MTM4OSA2NjI0NDU2Mjk2MjI1NDc5IDUyODA4ODgzMzUxNTUzODM=