startAuthentication() публичный Метод

Starts the authentication: Send HTTP header
public startAuthentication ( Request $request, Response $response ) : void
$request Neos\Flow\Http\Request The current request
$response Neos\Flow\Http\Response The current response
Результат void
 /**
  * @test
  */
 public function startAuthenticationSetsTheCorrectValuesInTheResponseObject()
 {
     $mockHttpRequest = $this->getMockBuilder(Request::class)->disableOriginalConstructor()->getMock();
     $mockResponse = $this->getMockBuilder(Response::class)->getMock();
     $entryPoint = new HttpBasic();
     $entryPoint->setOptions(['realm' => 'realm string']);
     $mockResponse->expects($this->once())->method('setStatus')->with(401);
     $mockResponse->expects($this->once())->method('setHeader')->with('WWW-Authenticate', 'Basic realm="realm string"');
     $mockResponse->expects($this->once())->method('setContent')->with('Authorization required');
     $entryPoint->startAuthentication($mockHttpRequest, $mockResponse);
     $this->assertEquals(['realm' => 'realm string'], $entryPoint->getOptions());
 }