File tree Expand file tree Collapse file tree 3 files changed +2
-16
lines changed Expand file tree Collapse file tree 3 files changed +2
-16
lines changed Original file line number Diff line number Diff line change 5
5
namespace Http \HttplugBundle \ClientFactory ;
6
6
7
7
use Http \Client \Socket \Client ;
8
- use Http \Message \MessageFactory ;
9
8
10
9
/**
11
10
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
12
11
*/
13
12
class SocketFactory implements ClientFactory
14
13
{
15
- /**
16
- * @var MessageFactory
17
- */
18
- private $ messageFactory ;
19
-
20
- public function __construct (MessageFactory $ messageFactory )
21
- {
22
- $ this ->messageFactory = $ messageFactory ;
23
- }
24
-
25
14
/**
26
15
* {@inheritdoc}
27
16
*/
Original file line number Diff line number Diff line change 92
92
<service id =" httplug.factory.guzzle6" class =" Http\HttplugBundle\ClientFactory\Guzzle6Factory" public =" false" />
93
93
<service id =" httplug.factory.guzzle7" class =" Http\HttplugBundle\ClientFactory\Guzzle7Factory" public =" false" />
94
94
<service id =" httplug.factory.react" class =" Http\HttplugBundle\ClientFactory\ReactFactory" public =" false" />
95
- <service id =" httplug.factory.socket" class =" Http\HttplugBundle\ClientFactory\SocketFactory" public =" false" >
96
- <argument type =" service" id =" httplug.message_factory" />
97
- </service >
95
+ <service id =" httplug.factory.socket" class =" Http\HttplugBundle\ClientFactory\SocketFactory" public =" false" />
98
96
<service id =" httplug.factory.symfony" class =" Http\HttplugBundle\ClientFactory\SymfonyFactory" public =" false" >
99
97
<argument type =" service" id =" httplug.psr17_response_factory" />
100
98
<argument type =" service" id =" httplug.psr17_stream_factory" />
Original file line number Diff line number Diff line change 6
6
7
7
use Http \Client \Socket \Client ;
8
8
use Http \HttplugBundle \ClientFactory \SocketFactory ;
9
- use Http \Message \MessageFactory ;
10
9
use PHPUnit \Framework \TestCase ;
11
10
12
11
/**
@@ -20,7 +19,7 @@ public function testCreateClient(): void
20
19
$ this ->markTestSkipped ('Socket client is not installed ' );
21
20
}
22
21
23
- $ factory = new SocketFactory ($ this -> getMockBuilder (MessageFactory::class)-> getMock () );
22
+ $ factory = new SocketFactory ();
24
23
$ client = $ factory ->createClient ();
25
24
26
25
$ this ->assertInstanceOf (Client::class, $ client );
You can’t perform that action at this time.
0 commit comments