@@ -36,6 +36,8 @@ public function testCreateConnection()
3636 $ this ->assertInstanceOf (StreamConnection::class, $ connection );
3737
3838 $ redisHost = explode (': ' , $ redisHost );
39+ $ connectionParameters = $ connection ->getParameters ()->toArray ();
40+
3941 $ params = [
4042 'scheme ' => 'tcp ' ,
4143 'host ' => $ redisHost [0 ],
@@ -46,7 +48,12 @@ public function testCreateConnection()
4648 'tcp_nodelay ' => true ,
4749 'database ' => '1 ' ,
4850 ];
49- $ this ->assertSame ($ params , $ connection ->getParameters ()->toArray ());
51+
52+ if (isset ($ connectionParameters ['conn_uid ' ])) {
53+ $ params ['conn_uid ' ] = $ connectionParameters ['conn_uid ' ]; // if present, the value cannot be predicted
54+ }
55+
56+ $ this ->assertSame ($ params , $ connectionParameters );
5057 }
5158
5259 public function testCreateSslConnection ()
@@ -60,6 +67,8 @@ public function testCreateSslConnection()
6067 $ this ->assertInstanceOf (StreamConnection::class, $ connection );
6168
6269 $ redisHost = explode (': ' , $ redisHost );
70+ $ connectionParameters = $ connection ->getParameters ()->toArray ();
71+
6372 $ params = [
6473 'scheme ' => 'tls ' ,
6574 'host ' => $ redisHost [0 ],
@@ -71,7 +80,12 @@ public function testCreateSslConnection()
7180 'tcp_nodelay ' => true ,
7281 'database ' => '1 ' ,
7382 ];
74- $ this ->assertSame ($ params , $ connection ->getParameters ()->toArray ());
83+
84+ if (isset ($ connectionParameters ['conn_uid ' ])) {
85+ $ params ['conn_uid ' ] = $ connectionParameters ['conn_uid ' ]; // if present, the value cannot be predicted
86+ }
87+
88+ $ this ->assertSame ($ params , $ connectionParameters );
7589 }
7690
7791 public function testAclUserPasswordAuth ()
0 commit comments