@@ -36,6 +36,8 @@ public function testCreateConnection()
36
36
$ this ->assertInstanceOf (StreamConnection::class, $ connection );
37
37
38
38
$ redisHost = explode (': ' , $ redisHost );
39
+ $ connectionParameters = $ connection ->getParameters ()->toArray ();
40
+
39
41
$ params = [
40
42
'scheme ' => 'tcp ' ,
41
43
'host ' => $ redisHost [0 ],
@@ -46,7 +48,12 @@ public function testCreateConnection()
46
48
'tcp_nodelay ' => true ,
47
49
'database ' => '1 ' ,
48
50
];
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 );
50
57
}
51
58
52
59
public function testCreateSslConnection ()
@@ -60,6 +67,8 @@ public function testCreateSslConnection()
60
67
$ this ->assertInstanceOf (StreamConnection::class, $ connection );
61
68
62
69
$ redisHost = explode (': ' , $ redisHost );
70
+ $ connectionParameters = $ connection ->getParameters ()->toArray ();
71
+
63
72
$ params = [
64
73
'scheme ' => 'tls ' ,
65
74
'host ' => $ redisHost [0 ],
@@ -71,7 +80,12 @@ public function testCreateSslConnection()
71
80
'tcp_nodelay ' => true ,
72
81
'database ' => '1 ' ,
73
82
];
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 );
75
89
}
76
90
77
91
public function testAclUserPasswordAuth ()
0 commit comments