public function XmlEncoderTest::testElementNameValid in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php \Symfony\Component\Serializer\Tests\Encoder\XmlEncoderTest::testElementNameValid()
File
- vendor/
symfony/ serializer/ Tests/ Encoder/ XmlEncoderTest.php, line 93
Class
Namespace
Symfony\Component\Serializer\Tests\EncoderCode
public function testElementNameValid() {
$obj = new ScalarDummy();
$obj->xmlFoo = array(
'foo-bar' => 'a',
'foo_bar' => 'a',
'föo_bär' => 'a',
);
$expected = '<?xml version="1.0"?>' . "\n" . '<response>' . '<foo-bar>a</foo-bar>' . '<foo_bar>a</foo_bar>' . '<föo_bär>a</föo_bär>' . '</response>' . "\n";
$this
->assertEquals($expected, $this->encoder
->encode($obj, 'xml'));
}