private ObjectNormalizer
$normalizer;
private SerializerInterface&NormalizerInterface&MockObject
$serializer;
protected function setUp(): void
{ $this->
createNormalizer();
} private function createNormalizer(array
$defaultContext =
[], ClassMetadataFactoryInterface
$classMetadataFactory = null
): void
{ $this->serializer =
$this->
createMock(ObjectSerializerNormalizer::
class);
$this->normalizer =
new ObjectNormalizer($classMetadataFactory, null, null, null, null, null,
$defaultContext);
$this->normalizer->
setSerializer($this->serializer
);
} public function testNormalize() { $obj =
new ObjectDummy();
$object =
new \
stdClass();
$obj->
setFoo('foo'
);
$obj->bar = 'bar';
$obj->
setBaz(true
);
$obj->
setCamelCase('camelcase'
);