@@ -54,28 +54,39 @@ protected function getInstance($options = [])
5454 return new RedisHandler (new AppConfig (), $ this ->userIpAddress );
5555 }
5656
57+ public function testSavePathWithoutProtocol ()
58+ {
59+ $ handler = $ this ->getInstance (
60+ ['savePath ' => '127.0.0.1:6379 ' ]
61+ );
62+
63+ $ savePath = $ this ->getPrivateProperty ($ handler , 'savePath ' );
64+
65+ $ this ->assertSame ('tcp ' , $ savePath ['protocol ' ]);
66+ }
67+
5768 public function testSavePathTLSAuth ()
5869 {
5970 $ handler = $ this ->getInstance (
60- ['savePath ' => 'tls://127.0.0.1:6379?auth=password&timeout=2.5 ' ]
71+ ['savePath ' => 'tls://127.0.0.1:6379?auth=password ' ]
6172 );
6273
6374 $ savePath = $ this ->getPrivateProperty ($ handler , 'savePath ' );
6475
76+ $ this ->assertSame ('tls ' , $ savePath ['protocol ' ]);
6577 $ this ->assertSame ('password ' , $ savePath ['password ' ]);
66- $ this ->assertSame (2.5 , $ savePath ['timeout ' ]);
6778 }
6879
6980 public function testSavePathTCPAuth ()
7081 {
7182 $ handler = $ this ->getInstance (
72- ['savePath ' => 'tcp://127.0.0.1:6379?auth=password&timeout=2.5 ' ]
83+ ['savePath ' => 'tcp://127.0.0.1:6379?auth=password ' ]
7384 );
7485
7586 $ savePath = $ this ->getPrivateProperty ($ handler , 'savePath ' );
7687
88+ $ this ->assertSame ('tcp ' , $ savePath ['protocol ' ]);
7789 $ this ->assertSame ('password ' , $ savePath ['password ' ]);
78- $ this ->assertSame (2.5 , $ savePath ['timeout ' ]);
7990 }
8091
8192 public function testSavePathTimeoutFloat ()
0 commit comments