Add integration and unit tests for PersonJsonNormalizer to verify normalization behavior

- Introduce `PersonJsonNormalizerIntegrationTest` to test database-driven normalization scenarios.
- Expand `PersonJsonNormalizerTest` with cases covering minimal group normalization and extended keys.
- Refactor test setup to use mock objects and improve coverage of normalization logic.
This commit is contained in:
2025-09-25 14:51:39 +02:00
parent 4b7e3c1601
commit d42a1296c4
3 changed files with 210 additions and 47 deletions

View File

@@ -78,11 +78,6 @@ class PersonJsonNormalizer implements NormalizerAwareInterface, NormalizerInterf
null];
}
public function supportsDenormalization($data, $type, $format = null)
{
return Person::class === $type && 'person' === ($data['type'] ?? null);
}
public function supportsNormalization($data, $format = null): bool
{
return $data instanceof Person && 'json' === $format;