@@ 17-25 (lines=9) @@ | ||
14 | class WriterClientTest extends \PHPUnit_Framework_TestCase |
|
15 | { |
|
16 | ||
17 | public function test_http_client_construction() |
|
18 | { |
|
19 | $factory = $this->prophesize(InfluxDbClientFactory::class); |
|
20 | $factory->buildHttpClient()->shouldBeCalledTimes(1); |
|
21 | ||
22 | $writer = new WriterClient($factory->reveal(), ClientInterface::HTTP_CLIENT); |
|
23 | ||
24 | $this->assertInstanceOf(WriterInterface::class, $writer); |
|
25 | } |
|
26 | ||
27 | public function test_udp_client_construction() |
|
28 | { |
|
@@ 27-35 (lines=9) @@ | ||
24 | $this->assertInstanceOf(WriterInterface::class, $writer); |
|
25 | } |
|
26 | ||
27 | public function test_udp_client_construction() |
|
28 | { |
|
29 | $factory = $this->prophesize(InfluxDbClientFactory::class); |
|
30 | $factory->buildUdpClient()->shouldBeCalledTimes(1); |
|
31 | ||
32 | $writer = new WriterClient($factory->reveal(), ClientInterface::UDP_CLIENT); |
|
33 | ||
34 | $this->assertInstanceOf(WriterInterface::class, $writer); |
|
35 | } |
|
36 | ||
37 | public function test_write() |
|
38 | { |