diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php index 4f83c6f948..d3463d41bd 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php @@ -312,6 +312,29 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); } + public function testDecodeIgnoreWhiteSpace() + { + $source = << + + + Benjamin + Alexandre + + + Damien + Clay + + +XML; + $expected = array('person' => array( + array('firstname' => 'Benjamin', 'lastname' => 'Alexandre'), + array('firstname' => 'Damien', 'lastname' => 'Clay') + )); + + $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); + } + public function testDecodeWithoutItemHash() { $obj = new ScalarDummy();