use Symfony\Component\Serializer\Tests\Fixtures\DeepObjectPopulateChildDummy;
use Symfony\Component\Serializer\Tests\Fixtures\DeepObjectPopulateParentDummy;
use Symfony\Component\Serializer\Tests\Fixtures\ProxyDummy;
use Symfony\Component\Serializer\Tests\Fixtures\ToBeProxyfiedDummy;
trait ObjectToPopulateTestTrait
{ abstract protected function getDenormalizerForObjectToPopulate(): DenormalizerInterface;
public function testObjectToPopulate() { $dummy =
new ObjectDummy();
$dummy->bar = 'bar';
$denormalizer =
$this->
getDenormalizerForObjectToPopulate();
$obj =
$denormalizer->
denormalize( ['foo' => 'foo'
],
ObjectDummy::
class,
null,
['object_to_populate' =>
$dummy] );