diff --git a/tests/Unit/Collector/HttpClientInterfaceProxyTest.php b/tests/Unit/Collector/HttpClientInterfaceProxyTest.php new file mode 100644 index 00000000..188b2c9f --- /dev/null +++ b/tests/Unit/Collector/HttpClientInterfaceProxyTest.php @@ -0,0 +1,37 @@ +createMock(ClientInterface::class); + $client->expects($this->once()) + ->method('sendRequest') + ->with($request) + ->willReturn($response); + $collector = new HttpClientCollector(new TimelineCollector()); + $collector->startup(); + + $proxy = new HttpClientInterfaceProxy($client, $collector); + + $newResponse = $proxy->sendRequest($request); + + $this->assertSame($newResponse, $response); + $this->assertCount(1, $collector->getCollected()); + } +}