use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
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,