Neos\Flow\Tests\Functional\Security\AuthenticationTest::setUp PHP Method

setUp() public method

public setUp ( ) : void
return void
    public function setUp()
    {
        parent::setUp();
        $accountRepository = $this->objectManager->get(AccountRepository::class);
        $accountFactory = $this->objectManager->get(AccountFactory::class);
        $account = $accountFactory->createAccountWithPassword('functional_test_account', 'a_very_secure_long_password', ['Neos.Flow:Administrator'], 'TestingProvider');
        $accountRepository->add($account);
        $account2 = $accountFactory->createAccountWithPassword('functional_test_account', 'a_very_secure_long_password', ['Neos.Flow:Administrator'], 'HttpBasicTestingProvider');
        $accountRepository->add($account2);
        $account3 = $accountFactory->createAccountWithPassword('functional_test_account', 'a_very_secure_long_password', ['Neos.Flow:Administrator'], 'UsernamePasswordTestingProvider');
        $accountRepository->add($account3);
        $this->persistenceManager->persistAll();
        $route = new Route();
        $route->setName('Functional Test - Security::Restricted');
        $route->setUriPattern('test/security/restricted(/{@action})');
        $route->setDefaults(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'Restricted', '@action' => 'public', '@format' => 'html']);
        $route->setAppendExceedingArguments(true);
        $this->router->addRoute($route);
        $route2 = new Route();
        $route2->setName('Functional Test - Security::Authentication');
        $route2->setUriPattern('test/security/authentication(/{@action})');
        $route2->setDefaults(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'Authentication', '@action' => 'authenticate', '@format' => 'html']);
        $route2->setAppendExceedingArguments(true);
        $this->router->addRoute($route2);
        $route3 = new Route();
        $route3->setName('Functional Test - Security::HttpBasicAuthentication');
        $route3->setUriPattern('test/security/authentication/httpbasic(/{@action})');
        $route3->setDefaults(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'HttpBasicTest', '@action' => 'authenticate', '@format' => 'html']);
        $route3->setAppendExceedingArguments(true);
        $this->router->addRoute($route3);
        $route4 = new Route();
        $route4->setName('Functional Test - Security::UsernamePasswordAuthentication');
        $route4->setUriPattern('test/security/authentication/usernamepassword(/{@action})');
        $route4->setDefaults(['@package' => 'Neos.Flow', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'UsernamePasswordTest', '@action' => 'authenticate', '@format' => 'html']);
        $route4->setAppendExceedingArguments(true);
        $this->router->addRoute($route4);
    }