diff --git a/tests/Serializer/EntitySerializerTest.php b/tests/Serializer/EntitySerializerTest.php index fad93329..e9b4ea75 100644 --- a/tests/Serializer/EntitySerializerTest.php +++ b/tests/Serializer/EntitySerializerTest.php @@ -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());