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