Neos\Flow\Tests\Unit\Http\BrowserTest::browserDoesNotRedirectOnLocationHeaderButNot3xxResponseCode PHP Method

browserDoesNotRedirectOnLocationHeaderButNot3xxResponseCode() public method

    public function browserDoesNotRedirectOnLocationHeaderButNot3xxResponseCode()
    {
        $twoZeroOneResponse = new Http\Response();
        $twoZeroOneResponse->setStatus(201);
        $twoZeroOneResponse->setHeader('Location', 'http://localhost/createdResource/isHere');
        $requestEngine = $this->createMock(Client\RequestEngineInterface::class);
        $requestEngine->expects($this->once())->method('sendRequest')->will($this->returnValue($twoZeroOneResponse));
        $this->browser->setRequestEngine($requestEngine);
        $actual = $this->browser->request('http://localhost/createSomeResource');
        $this->assertSame($twoZeroOneResponse, $actual);
    }