예제 #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));
 }
예제 #2
0
 public function restore(string $scope) : ParameterBag
 {
     return (new ParameterBag())->unserialize(BaseSession::load()->get($scope));
 }
예제 #3
0
 public function testDestruct()
 {
     Session::load()->destruct('foo');
     $this->assertNull(Session::load()->get('foo'));
 }