File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Http \HttplugBundle \Tests \Functional ;
6
+
7
+ use Http \Client \Common \HttpMethodsClient ;
8
+ use Http \Client \Common \PluginClientFactory ;
9
+ use Http \Discovery \HttpClientDiscovery ;
10
+ use Http \Discovery \MessageFactoryDiscovery ;
11
+ use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
12
+ use Http \HttplugBundle \Collector \PluginClientFactory as DebugFactory ;
13
+
14
+ class Issue206 extends WebTestCase
15
+ {
16
+ public function testCustomClientStillAvailable ()
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
+ }
You can’t perform that action at this time.
0 commit comments