'method' => 'GET',
'url' => '/404',
'options' =>
['base_uri' => 'http://localhost:8057/'
],
],
]);
$httpClient3 =
$this->
httpClientThatHasTracedRequests([]);
$sut =
new HttpClientDataCollector();
$sut->
registerClient('http_client1',
$httpClient1);
$sut->
registerClient('http_client2',
$httpClient2);
$sut->
registerClient('http_client3',
$httpClient3);
$this->
assertEquals([],
$sut->
getClients());
$sut->
lateCollect();
$collectedData =
$sut->
getClients();
$this->
assertEquals(0,
$collectedData['http_client1'
]['error_count'
]);
$this->
assertEquals(1,
$collectedData['http_client2'
]['error_count'
]);
$this->
assertEquals(0,
$collectedData['http_client3'
]['error_count'
]);
} public function testItCollectsTracesByClient() { $httpClient1 =
$this->
httpClientThatHasTracedRequests([ [