File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,10 @@ public static function getPrefix()
6161 *
6262 * @return bool
6363 */
64- public static function init ($ LifeTime = 0 )
64+ public static function init ($ lifeTime = 0 )
6565 {
6666 if (self ::$ sessionStarted == false ) {
67- session_set_cookie_params ($ LifeTime );
67+ session_set_cookie_params ($ lifeTime );
6868 session_start ();
6969
7070 return self ::$ sessionStarted = true ;
Original file line number Diff line number Diff line change @@ -85,6 +85,19 @@ public function testInit()
8585 $ this ->assertTrue ($ session ::init ());
8686 $ this ->assertFalse ($ session ::init ());
8787 }
88+
89+ /**
90+ * Start session with a max lifetime.
91+ *
92+ * @runInSeparateProcess
93+ */
94+ public function testInitLifeTime ()
95+ {
96+ $ session = $ this ->Session ;
97+
98+ $ this ->assertTrue ($ session ::init (10 ));
99+ $ this ->assertFalse ($ session ::init (10 ));
100+ }
88101
89102 /**
90103 * Add value to a session.
You can’t perform that action at this time.
0 commit comments