Skip to content

Commit 99d2f2d

Browse files
committed
Merge branch '3.0' into 3.1
* 3.0: [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 [DependencyInjection] Avoid generating call_user_func in more cases [Validator] Support for DateTimeImmutable [FrameworkBundle] update upgrade instructions Use levenshtein level for better Bundle matching [WebProfilerBundle] Fix CORS ajax security issues remove methods that were needed for PHP 5.3 [DX][DI] Make Autowiring exceptions more future friendly
2 parents a477de6 + 3232458 commit 99d2f2d

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
@@ -312,6 +312,19 @@ public function testIgnoredAttributes()
312312
);
313313
}
314314

315+
public function testIgnoredAttributesDenormalize()
316+
{
317+
$this->normalizer->setIgnoredAttributes(array('fooBar', 'bar', 'baz'));
318+
319+
$obj = new ObjectDummy();
320+
$obj->setFoo('foo');
321+
322+
$this->assertEquals(
323+
$obj,
324+
$this->normalizer->denormalize(array('fooBar' => 'fooBar', 'foo' => 'foo', 'baz' => 'baz'), __NAMESPACE__.'\ObjectDummy')
325+
);
326+
}
327+
315328
public function provideCallbacks()
316329
{
317330
return array(

0 commit comments

Comments
 (0)