public function PropertyNormalizerTest::testLegacyCamelizedAttributesDenormalize in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/serializer/Tests/Normalizer/PropertyNormalizerTest.php \Symfony\Component\Serializer\Tests\Normalizer\PropertyNormalizerTest::testLegacyCamelizedAttributesDenormalize()
@group legacy
File
- vendor/
symfony/ serializer/ Tests/ Normalizer/ PropertyNormalizerTest.php, line 106
Class
Namespace
Symfony\Component\Serializer\Tests\NormalizerCode
public function testLegacyCamelizedAttributesDenormalize() {
$obj = new PropertyCamelizedDummy('dunglas.fr');
$obj->fooBar = 'les-tilleuls.coop';
$obj->bar_foo = 'lostinthesupermarket.fr';
$this->normalizer
->setCamelizedAttributes(array(
'kevin_dunglas',
));
$this
->assertEquals($this->normalizer
->denormalize(array(
'kevin_dunglas' => 'dunglas.fr',
'fooBar' => 'les-tilleuls.coop',
'bar_foo' => 'lostinthesupermarket.fr',
), __NAMESPACE__ . '\\PropertyCamelizedDummy'), $obj);
$this->normalizer
->setCamelizedAttributes(array(
'foo_bar',
));
$this
->assertEquals($this->normalizer
->denormalize(array(
'kevinDunglas' => 'dunglas.fr',
'foo_bar' => 'les-tilleuls.coop',
'bar_foo' => 'lostinthesupermarket.fr',
), __NAMESPACE__ . '\\PropertyCamelizedDummy'), $obj);
}