Neos\Flow\Tests\Unit\Http\Component\TrustedProxiesComponentTest::setUp PHP Method

setUp() public method

public setUp ( )
    public function setUp()
    {
        $this->mockHttpRequest = $this->getMockBuilder(\Neos\Flow\Http\Request::class)->disableOriginalConstructor()->getMock();
        $this->mockHttpResponse = $this->getMockBuilder(\Neos\Flow\Http\Response::class)->disableOriginalConstructor()->getMock();
        $this->mockComponentContext = $this->trustedProxiesComponent = new TrustedProxiesComponent(array());
        $componentReflection = new \ReflectionClass($this->trustedProxiesComponent);
        $this->trustedProxiesSettings = $componentReflection->getProperty('settings');
        $this->trustedProxiesSettings->setAccessible(true);
        $this->withTrustedProxiesSettings(['proxies' => '*', 'headers' => ['clientIp' => 'Client-Ip,X-Forwarded-For,X-Forwarded,X-Cluster-Client-Ip,Forwarded-For,Forwarded', 'host' => 'X-Forwarded-Host', 'port' => 'X-Forwarded-Port', 'proto' => 'X-Forwarded-Proto']]);
    }