Example #1
0
 public function testLogout()
 {
     Security::load()->setUser((new SecurityProviderMock())->loadUserByIdentifier('foo'));
     $this->assertEquals('foo', Session::load()->get(Security::SESSION_ID, false));
     Security::load()->logout();
     $this->assertFalse(Session::load()->get(Security::SESSION_ID, false));
 }
Example #2
0
 public function restore(string $scope) : ParameterBag
 {
     return (new ParameterBag())->unserialize(BaseSession::load()->get($scope));
 }
Example #3
0
 public function testDestruct()
 {
     Session::load()->destruct('foo');
     $this->assertNull(Session::load()->get('foo'));
 }