public function testNotEncodableValueExceptionMessageForAResource() { $this->
expectException(NotEncodableValueException::
class);
$this->
expectExceptionMessage('An unexpected value could not be serialized: stream resource'
);
(new XmlEncoder())->
encode(tmpfile(), 'xml'
);
} public function testReentrantXmlEncoder() { $envelope =
new EnvelopeObject();
$message =
new EnvelopedMessage();
$message->text = 'Symfony is great';
$envelope->message =
$message;
$encoder =
$this->
createXmlEncoderWithEnvelopeNormalizer();
$expected = <<<'XML'
<?xml version="1.0"?>
<response><message>PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxyZXNwb25zZT48dGV4dD5TeW1mb255IGlzIGdyZWF0PC90ZXh0PjwvcmVzcG9uc2U+Cg==</message></response>
XML;