Skip to content

Commit b9fec17

Browse files
committed
Merge branch '3.1'
* 3.1: (24 commits) [Yaml] fix exception contexts Added people - person inflection 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 [Config] Allow schemed path in FileResource fix removed commands wording in upgrade file Catch \Throwable Catch \Throwable [DependencyInjection] Avoid generating call_user_func in more cases [Validator] Support for DateTimeImmutable [YAML] fixed "dump" signature in upgrade file [Cache] Rename nonce to version [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 ...
2 parents 4677a24 + 99d2f2d commit b9fec17

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)