Skip to content

Commit

Permalink
Declared mock Entity in testDenormalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarkhaire committed Dec 3, 2024
1 parent c719b87 commit 93b51a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/Serializer/EntitySerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ public function testDenormalize(mixed $normalized): void
// Set value of this nullable value to ensure that a special condition is triggered in the EntityDenormalizer.
$normalized->nullable = null;
/** @var MockEntity $object */
$object = static::$serializer->denormalize($normalized, MockEntity::class);
$mockEntity = new MockEntity();
$object = static::$serializer->denormalize($normalized, $mockEntity::class);
$this->assertTrue(true === $object->isBool());
$this->assertTrue(2 === $object->getInt());
$this->assertTrue(0 === $object->getZero());
Expand Down

0 comments on commit 93b51a7

Please sign in to comment.