@@ -50,7 +50,7 @@ public function testItCollectsRequestCount()
50
50
$ sut ->registerClient ('http_client2 ' , $ httpClient2 );
51
51
$ sut ->registerClient ('http_client3 ' , $ httpClient3 );
52
52
$ this ->assertEquals (0 , $ sut ->getRequestCount ());
53
- $ sut ->collect ( new Request (), new Response () );
53
+ $ sut ->lateCollect ( );
54
54
$ this ->assertEquals (3 , $ sut ->getRequestCount ());
55
55
}
56
56
@@ -79,7 +79,7 @@ public function testItCollectsErrorCount()
79
79
$ sut ->registerClient ('http_client2 ' , $ httpClient2 );
80
80
$ sut ->registerClient ('http_client3 ' , $ httpClient3 );
81
81
$ this ->assertEquals (0 , $ sut ->getErrorCount ());
82
- $ sut ->collect ( new Request (), new Response () );
82
+ $ sut ->lateCollect ( );
83
83
$ this ->assertEquals (1 , $ sut ->getErrorCount ());
84
84
}
85
85
@@ -108,7 +108,7 @@ public function testItCollectsErrorCountByClient()
108
108
$ sut ->registerClient ('http_client2 ' , $ httpClient2 );
109
109
$ sut ->registerClient ('http_client3 ' , $ httpClient3 );
110
110
$ this ->assertEquals ([], $ sut ->getClients ());
111
- $ sut ->collect ( new Request (), new Response () );
111
+ $ sut ->lateCollect ( );
112
112
$ collectedData = $ sut ->getClients ();
113
113
$ this ->assertEquals (0 , $ collectedData ['http_client1 ' ]['error_count ' ]);
114
114
$ this ->assertEquals (1 , $ collectedData ['http_client2 ' ]['error_count ' ]);
@@ -140,7 +140,7 @@ public function testItCollectsTracesByClient()
140
140
$ sut ->registerClient ('http_client2 ' , $ httpClient2 );
141
141
$ sut ->registerClient ('http_client3 ' , $ httpClient3 );
142
142
$ this ->assertEquals ([], $ sut ->getClients ());
143
- $ sut ->collect ( new Request (), new Response () );
143
+ $ sut ->lateCollect ( );
144
144
$ collectedData = $ sut ->getClients ();
145
145
$ this ->assertCount (2 , $ collectedData ['http_client1 ' ]['traces ' ]);
146
146
$ this ->assertCount (1 , $ collectedData ['http_client2 ' ]['traces ' ]);
@@ -157,7 +157,7 @@ public function testItIsEmptyAfterReset()
157
157
]);
158
158
$ sut = new HttpClientDataCollector ();
159
159
$ sut ->registerClient ('http_client1 ' , $ httpClient1 );
160
- $ sut ->collect ( new Request (), new Response () );
160
+ $ sut ->lateCollect ( );
161
161
$ collectedData = $ sut ->getClients ();
162
162
$ this ->assertCount (1 , $ collectedData ['http_client1 ' ]['traces ' ]);
163
163
$ sut ->reset ();
0 commit comments