createXmlEncoderWithEnvelopeNormalizer example

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;

        $this->assertSame($expected$encoder->encode($envelope, 'xml'));
    }

    public function testEncodeComment()
    {
        
Home | Imprint | This part of the site doesn't use cookies.