Skip to content

Commit

Permalink
test: pass serialization context to the serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainrider committed Dec 24, 2024
1 parent 2ea3da6 commit c8d6037
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Serializer/ApiResourceDenormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ public function testNestedApiResourceDenormalization(string $format): void

/** @var SerializerInterface $serializer */
$serializer = static::getContainer()->get(SerializerInterface::class);
$serializedEntity = $serializer->serialize($entity, $format, ['api_included' => ['color', 'hairs']]);
$serializedEntity = $serializer->serialize($entity, $format, [
'groups' => ['read'],
'api_included' => ['color', 'hairs'],
]);

/** @var Puppy $deserializedEntity */
$deserializedEntity = $serializer->deserialize($serializedEntity, PuppyResourceDto::class, $format);
Expand Down

0 comments on commit c8d6037

Please sign in to comment.