[Serializer] Silent deprecation notice
This commit is contained in:
parent
9c32972787
commit
8135843b70
|
@ -93,8 +93,10 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->assertEquals('bar', $obj->getBar());
|
$this->assertEquals('bar', $obj->getBar());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDenormalizeOnCamelCaseFormat()
|
public function testLegacyDenormalizeOnCamelCaseFormat()
|
||||||
{
|
{
|
||||||
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->normalizer->setCamelizedAttributes(array('camel_case'));
|
$this->normalizer->setCamelizedAttributes(array('camel_case'));
|
||||||
$obj = $this->normalizer->denormalize(
|
$obj = $this->normalizer->denormalize(
|
||||||
array('camel_case' => 'camelCase'),
|
array('camel_case' => 'camelCase'),
|
||||||
|
@ -109,8 +111,10 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->assertEquals(new GetSetDummy(), $this->normalizer->denormalize(null, __NAMESPACE__.'\GetSetDummy'));
|
$this->assertEquals(new GetSetDummy(), $this->normalizer->denormalize(null, __NAMESPACE__.'\GetSetDummy'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCamelizedAttributesNormalize()
|
public function testLegacyCamelizedAttributesNormalize()
|
||||||
{
|
{
|
||||||
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$obj = new GetCamelizedDummy('dunglas.fr');
|
$obj = new GetCamelizedDummy('dunglas.fr');
|
||||||
$obj->setFooBar('les-tilleuls.coop');
|
$obj->setFooBar('les-tilleuls.coop');
|
||||||
$obj->setBar_foo('lostinthesupermarket.fr');
|
$obj->setBar_foo('lostinthesupermarket.fr');
|
||||||
|
@ -130,8 +134,10 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCamelizedAttributesDenormalize()
|
public function testLegacyCamelizedAttributesDenormalize()
|
||||||
{
|
{
|
||||||
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$obj = new GetCamelizedDummy('dunglas.fr');
|
$obj = new GetCamelizedDummy('dunglas.fr');
|
||||||
$obj->setFooBar('les-tilleuls.coop');
|
$obj->setFooBar('les-tilleuls.coop');
|
||||||
$obj->setBar_foo('lostinthesupermarket.fr');
|
$obj->setBar_foo('lostinthesupermarket.fr');
|
||||||
|
|
|
@ -62,8 +62,10 @@ class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->assertEquals('bar', $obj->getBar());
|
$this->assertEquals('bar', $obj->getBar());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDenormalizeOnCamelCaseFormat()
|
public function testLegacyDenormalizeOnCamelCaseFormat()
|
||||||
{
|
{
|
||||||
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->normalizer->setCamelizedAttributes(array('camel_case'));
|
$this->normalizer->setCamelizedAttributes(array('camel_case'));
|
||||||
$obj = $this->normalizer->denormalize(
|
$obj = $this->normalizer->denormalize(
|
||||||
array('camel_case' => 'value'),
|
array('camel_case' => 'value'),
|
||||||
|
@ -72,8 +74,10 @@ class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->assertEquals('value', $obj->getCamelCase());
|
$this->assertEquals('value', $obj->getCamelCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCamelizedAttributesNormalize()
|
public function testLegacyCamelizedAttributesNormalize()
|
||||||
{
|
{
|
||||||
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$obj = new PropertyCamelizedDummy('dunglas.fr');
|
$obj = new PropertyCamelizedDummy('dunglas.fr');
|
||||||
$obj->fooBar = 'les-tilleuls.coop';
|
$obj->fooBar = 'les-tilleuls.coop';
|
||||||
$obj->bar_foo = 'lostinthesupermarket.fr';
|
$obj->bar_foo = 'lostinthesupermarket.fr';
|
||||||
|
@ -93,8 +97,10 @@ class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCamelizedAttributesDenormalize()
|
public function testLegacyCamelizedAttributesDenormalize()
|
||||||
{
|
{
|
||||||
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$obj = new PropertyCamelizedDummy('dunglas.fr');
|
$obj = new PropertyCamelizedDummy('dunglas.fr');
|
||||||
$obj->fooBar = 'les-tilleuls.coop';
|
$obj->fooBar = 'les-tilleuls.coop';
|
||||||
$obj->bar_foo = 'lostinthesupermarket.fr';
|
$obj->bar_foo = 'lostinthesupermarket.fr';
|
||||||
|
|
Reference in New Issue