$this->
assertArrayHasKey('line',
$collectedData['denormalize'
][0
]['normalization'
][ObjectNormalizer::
class]);
} public function testCollectEncoding() { $dataCollector =
new SerializerDataCollector();
$caller =
['name' => 'Foo.php', 'file' => 'src/Foo.php', 'line' => 123
];
$dataCollector->
collectEncode('traceIdOne', 'data', 'format',
['foo' => 'bar'
], 20.0,
$caller);
$dataCollector->
collectDecode('traceIdTwo', 'data', 'format',
['foo' => 'bar'
], 20.0,
$caller);
$dataCollector->
collectEncoding('traceIdOne', JsonEncoder::
class, 1.0
);
$dataCollector->
collectEncoding('traceIdOne', JsonEncoder::
class, 2.0
);
$dataCollector->
collectEncoding('traceIdOne', CsvEncoder::
class, 5.0
);
$dataCollector->
collectEncoding('traceIdOne', CsvEncoder::
class, 10.0
);
$dataCollector->
collectDecoding('traceIdTwo', JsonEncoder::
class, 1.0
);
$dataCollector->
collectDecoding('traceIdTwo', JsonEncoder::
class, 2.0
);
$dataCollector->
collectDecoding('traceIdTwo', CsvEncoder::
class, 5.0
);
$dataCollector->
collectDecoding('traceIdTwo', CsvEncoder::
class, 10.0
);
$dataCollector->
lateCollect();
$collectedData =
$dataCollector->
getData();