$this->
assertSame('baz',
$normalizedData->baz
);
} public function testInstantiateObjectDenormalizer() { $data =
['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'
];
$class = Dummy::
class;
$context =
[];
$normalizer =
new AbstractObjectNormalizerDummy();
$this->
assertInstanceOf(Dummy::
class,
$normalizer->
instantiateObject($data,
$class,
$context,
new \
ReflectionClass($class),
[]));
} public function testDenormalizeWithExtraAttribute() { $this->
expectException(ExtraAttributesException::
class);
$this->
expectExceptionMessage('Extra attributes are not allowed ("fooFoo" is unknown).'
);
$factory =
new ClassMetadataFactory(new AnnotationLoader());
$normalizer =
new AbstractObjectNormalizerDummy($factory);
$normalizer->
denormalize( ['fooFoo' => 'foo'
],
Dummy::
class,