Skip to content

Commit c217d37

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [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 Catch \Throwable Use levenshtein level for better Bundle matching [WebProfilerBundle] Fix CORS ajax security issues
2 parents da9f4ec + 26c3ac7 commit c217d37

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
@@ -336,6 +336,19 @@ public function testIgnoredAttributes()
336336
);
337337
}
338338

339+
public function testIgnoredAttributesDenormalize()
340+
{
341+
$this->normalizer->setIgnoredAttributes(array('fooBar', 'bar', 'baz'));
342+
343+
$obj = new ObjectDummy();
344+
$obj->setFoo('foo');
345+
346+
$this->assertEquals(
347+
$obj,
348+
$this->normalizer->denormalize(array('fooBar' => 'fooBar', 'foo' => 'foo', 'baz' => 'baz'), __NAMESPACE__.'\ObjectDummy')
349+
);
350+
}
351+
339352
public function provideCallbacks()
340353
{
341354
return array(

0 commit comments

Comments
 (0)