public function XmlEncoderTest::testEncodeScalar

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php, line 30

Class

XmlEncoderTest

Namespace

Symfony\Component\Serializer\Tests\Encoder

Code

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'));
}