public function testSupportsNormalization() { $this->
assertTrue($this->normalizer->
supportsNormalization(new ConstraintViolationList()));
$this->
assertFalse($this->normalizer->
supportsNormalization(new \
stdClass()));
} public function testNormalize() { $list =
new ConstraintViolationList([ new ConstraintViolation('a', 'b',
['value' => 'foo'
], 'c', 'd', 'e', null, 'f'
),
new ConstraintViolation('1', '2',
[], '3', '4', '5', null, '6'
),
]);
$expected =
[ 'type' => 'https://symfony.com/errors/validation',
'title' => 'Validation Failed',
'detail' => 'd: a
4: 1',
'violations' =>
[ [ 'propertyPath' => 'd',