]));
$sut->
lateCollect();
$collectedData =
$sut->
getClients();
self::
assertCount(1,
$collectedData['http_client'
]['traces'
]);
$curlCommand =
$collectedData['http_client'
]['traces'
][0
]['curlCommand'
];
self::
assertNull($curlCommand);
} private function httpClientThatHasTracedRequests($tracedRequests): TraceableHttpClient
{ $httpClient =
new TraceableHttpClient(new NativeHttpClient());
foreach ($tracedRequests as $request) { $response =
$httpClient->
request($request['method'
],
$request['url'
],
$request['options'
] ??
[]);
$response->
getContent(false
); // disables exceptions from destructors
} return $httpClient;
}}