@@ -31,8 +31,9 @@ public function testFooConnectionDefinition()
3131 'connection_timeout ' => 3 ,
3232 'read_write_timeout ' => 3 ,
3333 'ssl_context ' => array (),
34- 'keepalive ' => null ,
34+ 'keepalive ' => false ,
3535 'heartbeat ' => 0 ,
36+ 'use_socket ' => false
3637 ), $ factory ->getArgument (1 ));
3738 $ this ->assertEquals ('%old_sound_rabbit_mq.connection.class% ' , $ definition ->getClass ());
3839 }
@@ -58,8 +59,9 @@ public function testSslConnectionDefinition()
5859 'ssl_context ' => array (
5960 'verify_peer ' => false ,
6061 ),
61- 'keepalive ' => null ,
62+ 'keepalive ' => false ,
6263 'heartbeat ' => 0 ,
64+ 'use_socket ' => false
6365 ), $ factory ->getArgument (1 ));
6466 $ this ->assertEquals ('%old_sound_rabbit_mq.connection.class% ' , $ definition ->getClass ());
6567 }
@@ -83,8 +85,9 @@ public function testLazyConnectionDefinition()
8385 'connection_timeout ' => 3 ,
8486 'read_write_timeout ' => 3 ,
8587 'ssl_context ' => array (),
86- 'keepalive ' => null ,
88+ 'keepalive ' => false ,
8789 'heartbeat ' => 0 ,
90+ 'use_socket ' => false
8891 ), $ factory ->getArgument (1 ));
8992 $ this ->assertEquals ('%old_sound_rabbit_mq.lazy.connection.class% ' , $ definition ->getClass ());
9093 }
@@ -108,12 +111,31 @@ public function testDefaultConnectionDefinition()
108111 'connection_timeout ' => 3 ,
109112 'read_write_timeout ' => 3 ,
110113 'ssl_context ' => array (),
111- 'keepalive ' => null ,
114+ 'keepalive ' => false ,
112115 'heartbeat ' => 0 ,
116+ 'use_socket ' => false
113117 ), $ factory ->getArgument (1 ));
114118 $ this ->assertEquals ('%old_sound_rabbit_mq.connection.class% ' , $ definition ->getClass ());
115119 }
116120
121+ public function testSocketConnectionDefinition ()
122+ {
123+ $ container = $ this ->getContainer ('test.yml ' );
124+ $ this ->assertTrue ($ container ->has ('old_sound_rabbit_mq.connection.socket_connection ' ));
125+ $ definiton = $ container ->getDefinition ('old_sound_rabbit_mq.connection.socket_connection ' );
126+ $ this ->assertTrue ($ container ->has ('old_sound_rabbit_mq.connection_factory.socket_connection ' ));
127+ $ this ->assertEquals ('%old_sound_rabbit_mq.socket_connection.class% ' , $ definiton ->getClass ());
128+ }
129+
130+ public function testLazySocketConnectionDefinition ()
131+ {
132+ $ container = $ this ->getContainer ('test.yml ' );
133+ $ this ->assertTrue ($ container ->has ('old_sound_rabbit_mq.connection.lazy_socket ' ));
134+ $ definiton = $ container ->getDefinition ('old_sound_rabbit_mq.connection.lazy_socket ' );
135+ $ this ->assertTrue ($ container ->has ('old_sound_rabbit_mq.connection_factory.lazy_socket ' ));
136+ $ this ->assertEquals ('%old_sound_rabbit_mq.lazy.socket_connection.class% ' , $ definiton ->getClass ());
137+ }
138+
117139 public function testFooBinding ()
118140 {
119141 $ container = $ this ->getContainer ('test.yml ' );
0 commit comments