File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ services:
1010 enqueue.producer :
1111 alias : ' enqueue.client.producer'
1212
13+ enqueue.client.rpc_client :
14+ class : ' Enqueue\Client\RpcClient'
15+ arguments :
16+ - ' @enqueue.client.driver'
17+ - ' @enqueue.client.producer'
18+ - ' @enqueue.transport.context'
19+
1320 enqueue.client.router_processor :
1421 class : ' Enqueue\Client\RouterProcessor'
1522 public : true
Original file line number Diff line number Diff line change @@ -17,3 +17,8 @@ services:
1717 - ' @enqueue.consumption.queue_consumer'
1818 tags :
1919 - { name: 'console.command' }
20+
21+ enqueue.transport.rpc_client :
22+ class : ' Enqueue\Rpc\RpcClient'
23+ arguments :
24+ - ' @enqueue.transport.context'
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Enqueue \Bundle \Tests \Functional ;
4+
5+ /**
6+ * @group functional
7+ */
8+ class RpcClientTest extends WebTestCase
9+ {
10+ public function testTransportRpcClientCouldBeGetFromContainerAsService ()
11+ {
12+ $ connection = $ this ->container ->get ('enqueue.transport.rpc_client ' );
13+
14+ $ this ->assertInstanceOf (\Enqueue \Rpc \RpcClient::class, $ connection );
15+ }
16+
17+ public function testClientRpcClientCouldBeGetFromContainerAsService ()
18+ {
19+ $ connection = $ this ->container ->get ('enqueue.client.rpc_client ' );
20+
21+ $ this ->assertInstanceOf (\Enqueue \Client \RpcClient::class, $ connection );
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments