File tree Expand file tree Collapse file tree
tests/system/Session/Handlers/Database Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,6 +63,28 @@ private function getInstance($options = [])
6363 return new RedisHandler ($ appConfig , $ this ->userIpAddress );
6464 }
6565
66+ public function testSavePathTimeoutFloat ()
67+ {
68+ $ handler = $ this ->getInstance (
69+ ['sessionSavePath ' => 'tcp://127.0.0.1:6379?timeout=2.5 ' ]
70+ );
71+
72+ $ savePath = $ this ->getPrivateProperty ($ handler , 'savePath ' );
73+
74+ $ this ->assertSame (2.5 , $ savePath ['timeout ' ]);
75+ }
76+
77+ public function testSavePathTimeoutInt ()
78+ {
79+ $ handler = $ this ->getInstance (
80+ ['sessionSavePath ' => 'tcp://127.0.0.1:6379?timeout=10 ' ]
81+ );
82+
83+ $ savePath = $ this ->getPrivateProperty ($ handler , 'savePath ' );
84+
85+ $ this ->assertSame (10.0 , $ savePath ['timeout ' ]);
86+ }
87+
6688 public function testOpen ()
6789 {
6890 $ handler = $ this ->getInstance ();
You can’t perform that action at this time.
0 commit comments