private PropertyNormalizer
$normalizer;
private SerializerInterface
$serializer;
protected function setUp(): void
{ $this->
createNormalizer();
} private function createNormalizer(array
$defaultContext =
[]): void
{ $this->serializer =
$this->
createMock(SerializerInterface::
class);
$this->normalizer =
new PropertyNormalizer(null, null, null, null, null,
$defaultContext);
$this->normalizer->
setSerializer($this->serializer
);
} public function testNormalize() { $obj =
new PropertyDummy();
$obj->foo = 'foo';
$obj->
setBar('bar'
);
$obj->
setCamelCase('camelcase'
);
$this->
assertEquals( ['foo' => 'foo', 'bar' => 'bar', 'camelCase' => 'camelcase'
],