public function XmlEncoderTest::testSetRootNodeName in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php \Symfony\Component\Serializer\Tests\Encoder\XmlEncoderTest::testSetRootNodeName()
File
- vendor/
symfony/ serializer/ Tests/ Encoder/ XmlEncoderTest.php, line 43
Class
Namespace
Symfony\Component\Serializer\Tests\EncoderCode
public function testSetRootNodeName() {
$obj = new ScalarDummy();
$obj->xmlFoo = 'foo';
$this->encoder
->setRootNodeName('test');
$expected = '<?xml version="1.0"?>' . "\n" . '<test>foo</test>' . "\n";
$this
->assertEquals($expected, $this->encoder
->encode($obj, 'xml'));
}