Skip to content

Commit 3232458

Browse files
committed
Merge branch '2.8' into 3.0
* 2.8: [Yaml] fix exception contexts People - person singularization [Yaml] properly handle unindented collections [Serializer] Add test for ignored attributes during denormalization chomp newlines only at the end of YAML documents Fixed server status command when port has been omitted Update UPGRADE FROM 2.x to 3.0 fix removed commands wording in upgrade file Catch \Throwable Catch \Throwable Use levenshtein level for better Bundle matching [WebProfilerBundle] Fix CORS ajax security issues [DX][DI] Make Autowiring exceptions more future friendly
2 parents 0baa375 + c217d37 commit 3232458

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Tests/Normalizer/ObjectNormalizerTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,19 @@ public function testIgnoredAttributes()
308308
);
309309
}
310310

311+
public function testIgnoredAttributesDenormalize()
312+
{
313+
$this->normalizer->setIgnoredAttributes(array('fooBar', 'bar', 'baz'));
314+
315+
$obj = new ObjectDummy();
316+
$obj->setFoo('foo');
317+
318+
$this->assertEquals(
319+
$obj,
320+
$this->normalizer->denormalize(array('fooBar' => 'fooBar', 'foo' => 'foo', 'baz' => 'baz'), __NAMESPACE__.'\ObjectDummy')
321+
);
322+
}
323+
311324
public function provideCallbacks()
312325
{
313326
return array(

0 commit comments

Comments
 (0)