@@ 42-52 (lines=11) @@ | ||
39 | $this->assertInstanceOf(HttpAsyncClient::class, $service); |
|
40 | } |
|
41 | ||
42 | public function testDiscoveredClientWithProfilingEnabled(): void |
|
43 | { |
|
44 | $container = $this->getContainer(true); |
|
45 | ||
46 | $this->assertTrue($container->has('httplug.auto_discovery.auto_discovered_client')); |
|
47 | ||
48 | $service = $container->get('httplug.auto_discovery.auto_discovered_client'); |
|
49 | ||
50 | $this->assertInstanceOf(ProfileClient::class, $service); |
|
51 | $this->assertInstanceOf(HttpClient::class, NSA::getProperty($service, 'client')); |
|
52 | } |
|
53 | ||
54 | public function testDiscoveredAsyncClientWithProfilingEnabled(): void |
|
55 | { |
|
@@ 54-64 (lines=11) @@ | ||
51 | $this->assertInstanceOf(HttpClient::class, NSA::getProperty($service, 'client')); |
|
52 | } |
|
53 | ||
54 | public function testDiscoveredAsyncClientWithProfilingEnabled(): void |
|
55 | { |
|
56 | $container = $this->getContainer(true); |
|
57 | ||
58 | $this->assertTrue($container->has('httplug.auto_discovery.auto_discovered_async')); |
|
59 | ||
60 | $service = $container->get('httplug.auto_discovery.auto_discovered_async'); |
|
61 | ||
62 | $this->assertInstanceOf(ProfileClient::class, $service); |
|
63 | $this->assertInstanceOf(HttpAsyncClient::class, NSA::getProperty($service, 'client')); |
|
64 | } |
|
65 | ||
66 | /** |
|
67 | * Test with httplug.discovery.client: "auto". |