X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fserializer%2FTests%2FEncoder%2FXmlEncoderTest.php;fp=vendor%2Fsymfony%2Fserializer%2FTests%2FEncoder%2FXmlEncoderTest.php;h=b8ec8fd0d674dac1c581ffb34c3be2c4c6cd0c68;hp=e036fbbaf486b7caae52a1b15bd01bd9cc931f51;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php b/vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php index e036fbbaf..b8ec8fd0d 100644 --- a/vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php +++ b/vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php @@ -222,6 +222,46 @@ XML; $this->assertEquals('foo', $this->encoder->decode($source, 'xml')); } + public function testDecodeBigDigitAttributes() + { + $source = << +Name +XML; + + $this->assertSame(array('@index' => 182077241760011681341821060401202210011000045913000000017100, '#' => 'Name'), $this->encoder->decode($source, 'xml')); + } + + public function testDecodeNegativeIntAttribute() + { + $source = << +Name +XML; + + $this->assertSame(array('@index' => -1234, '#' => 'Name'), $this->encoder->decode($source, 'xml')); + } + + public function testDecodeFloatAttribute() + { + $source = << +Name +XML; + + $this->assertSame(array('@index' => -12.11, '#' => 'Name'), $this->encoder->decode($source, 'xml')); + } + + public function testDecodeNegativeFloatAttribute() + { + $source = << +Name +XML; + + $this->assertSame(array('@index' => -12.11, '#' => 'Name'), $this->encoder->decode($source, 'xml')); + } + public function testEncode() { $source = $this->getXmlSource();