File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ test ('values can be read from session ' , function () {
4+ $ name = 'JMitchell ' ;
5+
6+ $ session = new \Leaf \Http \Session ();
7+ $ session ->set ('name ' , $ name );
8+
9+ expect ($ session ->get ('name ' ))->toBe ($ name );
10+ });
11+
12+ test ('values can be read from session using array ' , function () {
13+ $ name = 'JMitchell ' ;
14+
15+ $ session = new \Leaf \Http \Session ();
16+ $ session ->set ('name ' , $ name );
17+
18+ $ data = $ session ->get (['name ' ]);
19+
20+ expect ($ data ['name ' ])->toBe ($ name );
21+ });
22+
23+ test ('values can be read from session using dot notation ' , function () {
24+ $ name = 'JMitchell ' ;
25+
26+ $ session = new \Leaf \Http \Session ();
27+ $ session ->set ('user.name ' , $ name );
28+
29+ expect ($ session ->get ('user.name ' ))->toBe ($ name );
30+ });
You can’t perform that action at this time.
0 commit comments