X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fserializer%2FTests%2FNormalizer%2FObjectNormalizerTest.php;h=1f735cc243b94f6e82799018544c601b2ba86892;hp=c0483180dc99dd733768c2276ddf3f6863b64566;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/symfony/serializer/Tests/Normalizer/ObjectNormalizerTest.php b/vendor/symfony/serializer/Tests/Normalizer/ObjectNormalizerTest.php index c0483180d..1f735cc24 100644 --- a/vendor/symfony/serializer/Tests/Normalizer/ObjectNormalizerTest.php +++ b/vendor/symfony/serializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -488,6 +488,11 @@ class ObjectNormalizerTest extends TestCase $this->assertEquals(array('foo' => 'K'), $this->normalizer->normalize(new ObjectWithStaticPropertiesAndMethods())); } + public function testNormalizeUpperCaseAttributes() + { + $this->assertEquals(array('Foo' => 'Foo', 'Bar' => 'BarBar'), $this->normalizer->normalize(new ObjectWithUpperCaseAttributeNames())); + } + public function testNormalizeNotSerializableContext() { $objectDummy = new ObjectDummy(); @@ -662,3 +667,14 @@ class ObjectWithStaticPropertiesAndMethods return 'L'; } } + +class ObjectWithUpperCaseAttributeNames +{ + private $Foo = 'Foo'; + public $Bar = 'BarBar'; + + public function getFoo() + { + return $this->Foo; + } +}