/**
  * Resets security test requirements
  *
  * @return void
  */
 protected function tearDownSecurity()
 {
     if ($this->accessDecisionManager !== NULL) {
         $this->accessDecisionManager->reset();
     }
     if ($this->policyService !== NULL) {
         $this->policyService->reset();
         // the following should be removed as soon as RoleRepository is cleaned up #43192
         $roleRepository = $this->objectManager->get('TYPO3\\Flow\\Security\\Policy\\RoleRepository');
         \TYPO3\Flow\Reflection\ObjectAccess::setProperty($roleRepository, 'newRoles', array(), TRUE);
     }
     if ($this->testingProvider !== NULL) {
         $this->testingProvider->reset();
     }
     if ($this->securityContext !== NULL) {
         $this->securityContext->clearContext();
     }
     \TYPO3\Flow\Reflection\ObjectAccess::setProperty($this->authenticationManager, 'isAuthenticated', NULL, TRUE);
 }
 /**
  * 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) {
         \TYPO3\Flow\Reflection\ObjectAccess::setProperty($this->authenticationManager, 'isAuthenticated', null, true);
     }
 }