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