You are here

public function XmlEncoderTest::testDecodeCdataWrappingAndWhitespace in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php \Symfony\Component\Serializer\Tests\Encoder\XmlEncoderTest::testDecodeCdataWrappingAndWhitespace()

File

vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php, line 271

Class

XmlEncoderTest

Namespace

Symfony\Component\Serializer\Tests\Encoder

Code

public function testDecodeCdataWrappingAndWhitespace() {
  $expected = array(
    'firstname' => 'Paul <or Me>',
  );
  $xml = '<?xml version="1.0"?>' . "\n" . '<response><firstname>' . "\n" . '<![CDATA[Paul <or Me>]]></firstname></response>' . "\n";
  $this
    ->assertEquals($expected, $this->encoder
    ->decode($xml, 'xml'));
}