Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function testCustomClientDoesNotCauseException() |
||
17 | { |
||
18 | static::bootKernel(); |
||
19 | $container = static::$kernel->getContainer(); |
||
20 | PluginClientFactory::setFactory([$container->get('Http\Client\Common\PluginClientFactory'), 'createClient']); |
||
21 | |||
22 | // Create a client |
||
23 | $myCustomClient = new HttpMethodsClient(HttpClientDiscovery::find(), MessageFactoryDiscovery::find()); |
||
24 | $pluginClient = (new PluginClientFactory())->createClient($myCustomClient, []); |
||
25 | |||
26 | // If we get to this line, no exceptions has been thrown. |
||
27 | $this->assertInstanceOf(PluginClient::class, $pluginClient); |
||
28 | } |
||
29 | } |
||
30 |