private string
$exampleDateTimeString = '2017-02-19T15:16:08+0300';
protected function setUp(): void
{ $this->encoder =
new XmlEncoder();
$serializer =
new Serializer([new CustomNormalizer()],
['xml' =>
new XmlEncoder()]);
$this->encoder->
setSerializer($serializer);
} public function testEncodeScalar() { $obj =
new ScalarDummy();
$obj->xmlFoo = 'foo';
$expected = '<?xml version="1.0"?>'."\n".
'<response>foo</response>'."\n";
$this->
assertEquals($expected,
$this->encoder->
encode($obj, 'xml'
));
} public function testEncodeArrayObject() { $obj =
new \
ArrayObject(['foo' => 'bar'
]);