class SerializerDataCollectorTest extends TestCase
{ public function testCollectSerialize() { $dataCollector =
new SerializerDataCollector();
$caller =
['name' => 'Foo.php', 'file' => 'src/Foo.php', 'line' => 123
];
$dataCollector->
collectSerialize('traceIdOne', 'data', 'format',
['foo' => 'bar'
], 1.0,
$caller);
$dataCollector->
collectDeserialize('traceIdTwo', 'data', 'type', 'format',
['foo' => 'bar'
], 1.0,
$caller);
$dataCollector->
lateCollect();
$collectedData =
$this->
castCollectedData($dataCollector->
getData());
$this->
assertSame([[ 'data' => 'data',
'dataType' => 'string',
'type' => null,
'format' => 'format',
'time' => 1.0,
'context' =>
['foo' => 'bar'
],
'normalization' =>
[],
'encoding' =>
[],
'caller' =>
$caller,
]],