/**
  * Sets up security test requirements
  *
  * Security is based on action requests so we need a working route for the TestingProvider.
  *
  * @return void
  */
 protected function setupSecurity()
 {
     $this->accessDecisionManager = $this->objectManager->get('TYPO3\\Flow\\Security\\Authorization\\AccessDecisionManagerInterface');
     $this->accessDecisionManager->setOverrideDecision(NULL);
     $this->policyService = $this->objectManager->get('TYPO3\\Flow\\Security\\Policy\\PolicyService');
     $this->authenticationManager = $this->objectManager->get('TYPO3\\Flow\\Security\\Authentication\\AuthenticationProviderManager');
     $this->testingProvider = $this->objectManager->get('TYPO3\\Flow\\Security\\Authentication\\Provider\\TestingProvider');
     $this->testingProvider->setName('TestingProvider');
     $this->securityContext = $this->objectManager->get('TYPO3\\Flow\\Security\\Context');
     $this->securityContext->clearContext();
     $httpRequest = Request::createFromEnvironment();
     $this->mockActionRequest = new ActionRequest($httpRequest);
     $this->mockActionRequest->setControllerObjectName('TYPO3\\Flow\\Tests\\Functional\\Security\\Fixtures\\Controller\\AuthenticationController');
     $this->securityContext->setRequest($this->mockActionRequest);
 }
 /**
  * Disables authorization for the current test
  *
  * @return void
  * @api
  */
 protected function disableAuthorization()
 {
     $this->accessDecisionManager->setOverrideDecision(TRUE);
 }