$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'
],
$this->normalizer->
normalize($obj, 'any'
) );
} public function testNormalizeObjectWithUninitializedProperties() { $obj =
new Php74Dummy();
$this->
assertEquals( ['initializedProperty' => 'defaultValue'
],