Neos\Flow\Tests\FunctionalTestCase::setupHttp PHP Method

setupHttp() protected method

Sets up a virtual browser and web environment for seamless HTTP and MVC related tests.
protected setupHttp ( ) : void
return void
    protected function setupHttp()
    {
        $this->browser = new \Neos\Flow\Http\Client\Browser();
        $this->browser->setRequestEngine(new \Neos\Flow\Http\Client\InternalRequestEngine());
        $this->router = $this->browser->getRequestEngine()->getRouter();
        $this->router->setRoutesConfiguration(null);
        $requestHandler = self::$bootstrap->getActiveRequestHandler();
        $request = Request::create(new \Neos\Flow\Http\Uri('http://localhost/typo3/flow/test'));
        $componentContext = new ComponentContext($request, new \Neos\Flow\Http\Response());
        $requestHandler->setComponentContext($componentContext);
    }