'message' => 'The type of the "bool" attribute for class "Symfony\\Component\\Serializer\\Tests\\Fixtures\\Php80WithPromotedTypedConstructor" must be one of "bool" ("string" given).',
],
];
$this->
assertSame($expected,
$exceptionsAsArray);
} public function testCollectDenormalizationErrorsWithEnumConstructor() { $serializer =
new Serializer( [ new BackedEnumNormalizer(),
new ObjectNormalizer(),
],
['json' =>
new JsonEncoder()] );
try { $serializer->
deserialize('{"invalid": "GET"}', DummyObjectWithEnumConstructor::
class, 'json',
[ DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS => true,
]);
} catch (\Throwable
$th) { $this->
assertInstanceOf(PartialDenormalizationException::
class,
$th);
}