From ed6c2c23522a43a65eda5a6b2eeafcf75f7f544b Mon Sep 17 00:00:00 2001 From: Vladislav Vlastovskiy Date: Fri, 7 Apr 2017 12:46:44 +0300 Subject: [PATCH] Add test --- .../Serializer/Tests/Encoder/XmlEncoderTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php index f0c7b17e74366..1a9bbd83d747c 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php @@ -344,6 +344,19 @@ public function testDecodeWithoutItemHash() $xml = $this->encoder->encode($obj, 'xml'); $this->assertEquals($expected, $this->encoder->decode($xml, 'xml')); } + + public function testDecodeBigDigitAttributes() + { + $source = ''."\n". + 'Name'."\n"; + + $expected = array( + '#' => 'Name', + '@index' => '182077241760011681341821060401202210011000045913000000017100', + ); + + $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); + } /** * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException