$serializer->
deserialize('{"get": "POST"}', DummyObjectWithEnumConstructor::
class, 'json',
[ DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS => true,
]);
} catch (\Throwable
$th) { $this->
assertNotInstanceOf(PartialDenormalizationException::
class,
$th);
$this->
assertInstanceOf(InvalidArgumentException::
class,
$th);
} } public function testGroupsOnClassSerialization() { $obj =
new Fixtures\Attributes\
GroupClassDummy();
$obj->
setFoo('foo'
);
$obj->
setBar('bar'
);
$obj->
setBaz('baz'
);
$serializer =
new Serializer( [ new ObjectNormalizer(),
],
[ 'json' =>
new JsonEncoder(),
] );