->
with('data', 'format',
$this->
isType('array'
)) ->
willReturn('normalized'
);
$denormalizer =
$this->
createMock(DenormalizerInterface::
class);
$denormalizer->
method('getSupportedTypes'
)->
willReturn(['*' => false
]);
$denormalizer ->
expects($this->
once()) ->
method('denormalize'
) ->
with('data', 'type', 'format',
$this->
isType('array'
)) ->
willReturn('denormalized'
);
$this->
assertSame('normalized',
(new TraceableNormalizer($normalizer,
new SerializerDataCollector()))->
normalize('data', 'format'
));
$this->
assertSame('denormalized',
(new TraceableNormalizer($denormalizer,
new SerializerDataCollector()))->
denormalize('data', 'type', 'format'
));
} public function testCollectNormalizationData() { $normalizer =
$this->
createMock(NormalizerInterface::
class);
$normalizer->
method('getSupportedTypes'
)->
willReturn(['*' => false
]);
$denormalizer =
$this->
createMock(DenormalizerInterface::
class);
$denormalizer->
method('getSupportedTypes'
)->
willReturn(['*' => false
]);
$dataCollector =
$this->
createMock(SerializerDataCollector::
class);