minor #31005 [Serializer] take setIgnoredAttributes() deprecation into account (xabbuh)

This PR was merged into the 4.2 branch.

Discussion
----------

[Serializer] take setIgnoredAttributes() deprecation into account

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

4134be127a take setIgnoredAttributes() deprecation into account
This commit is contained in:
Fabien Potencier 2019-04-08 16:14:28 +02:00
commit f794e41544

View File

@ -497,7 +497,8 @@ class ObjectNormalizerTest extends TestCase
$this->normalizer->normalize($obj, 'any')
);
$this->normalizer->setIgnoredAttributes(['foo', 'baz', 'camelCase', 'object']);
$ignoredAttributes = ['foo', 'baz', 'camelCase', 'object'];
$legacy ? $this->normalizer->setIgnoredAttributes($ignoredAttributes) : $this->createNormalizer([ObjectNormalizer::IGNORED_ATTRIBUTES => $ignoredAttributes]);
$this->assertEquals(
[