Neos\Flow\Security\Policy\PolicyService::reset PHP Метод

reset() публичный Метод

Resets the PolicyService to behave transparently during functional testing.
public reset ( ) : void
Результат void
    public function reset()
    {
        $this->initialized = false;
        $this->roles = [];
    }

Usage Example

 /**
  * Resets security test requirements
  *
  * @return void
  */
 protected function tearDownSecurity()
 {
     if ($this->privilegeManager !== null) {
         $this->privilegeManager->reset();
     }
     if ($this->policyService !== null) {
         $this->policyService->reset();
     }
     if ($this->testingProvider !== null) {
         $this->testingProvider->reset();
     }
     if ($this->securityContext !== null) {
         $this->securityContext->clearContext();
     }
     if ($this->authenticationManager !== null) {
         \Neos\Utility\ObjectAccess::setProperty($this->authenticationManager, 'isAuthenticated', null, true);
     }
 }
All Usage Examples Of Neos\Flow\Security\Policy\PolicyService::reset