PHP Класс Neos\Flow\Tests\FunctionalTestRequestHandler

As this request handler will be the "active" request handler returned by the bootstrap's getActiveRequestHandler() method, it also needs some support for HTTP request testing scenarios. For that reason it features a setRequest() method which is used by the FunctionalTestCase for setting the current HTTP request. That way, the request handler acts pretty much like the Http\RequestHandler from a client code perspective. The virtual browser's InternalRequestEngine will also set the current request via the setRequest() method.
Наследование: implements Neos\Flow\Http\HttpRequestHandlerInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$bootstrap Neos\Flow\Core\Bootstrap
$componentContext Neos\Flow\Http\Component\ComponentContext

Открытые методы

Метод Описание
__construct ( Bootstrap $bootstrap ) Constructor
canHandleRequest ( ) : boolean This request handler can handle requests in Testing Context.
getHttpRequest ( ) : Request Returns the currently processed HTTP request
getHttpResponse ( ) : Response Returns the HTTP response corresponding to the currently handled request
getPriority ( ) : integer Returns the priority - how eager the handler is to actually handle the request.
handleRequest ( ) : void Handles a command line request
setComponentContext ( ComponentContext $context ) : void Allows to set the currently processed HTTP component chain context by the base functional test case.
setHttpRequest ( Request $request ) : void Allows to set the currently processed HTTP request by the base functional test case.
setHttpResponse ( Response $response ) : void Allows to set the currently processed HTTP response by the base functional test case.

Защищенные методы

Метод Описание
getComponentContext ( ) : ComponentContext Internal getter to ensure an existing ComponentContext.

Описание методов

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

Constructor
public __construct ( Bootstrap $bootstrap )
$bootstrap Neos\Flow\Core\Bootstrap

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

This request handler can handle requests in Testing Context.
public canHandleRequest ( ) : boolean
Результат boolean If the context is Testing, TRUE otherwise FALSE

getComponentContext() защищенный Метод

Internal getter to ensure an existing ComponentContext.
protected getComponentContext ( ) : ComponentContext
Результат Neos\Flow\Http\Component\ComponentContext

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

Returns the currently processed HTTP request
public getHttpRequest ( ) : Request
Результат Neos\Flow\Http\Request

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

Returns the HTTP response corresponding to the currently handled request
public getHttpResponse ( ) : Response
Результат Neos\Flow\Http\Response

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

As this request handler can only be used as a preselected request handler, the priority for all other cases is 0.
public getPriority ( ) : integer
Результат integer The priority of the request handler.

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

Handles a command line request
public handleRequest ( ) : void
Результат void

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

Allows to set the currently processed HTTP component chain context by the base functional test case.
См. также: InternalRequestEngine::sendRequest()
public setComponentContext ( ComponentContext $context ) : void
$context Neos\Flow\Http\Component\ComponentContext
Результат void

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

Allows to set the currently processed HTTP request by the base functional test case.
Устаревший: since Flow 3.3, use setComponentContext() instead
public setHttpRequest ( Request $request ) : void
$request Neos\Flow\Http\Request
Результат void

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

Allows to set the currently processed HTTP response by the base functional test case.
Устаревший: since Flow 3.3, use setComponentContext() instead
public setHttpResponse ( Response $response ) : void
$response Neos\Flow\Http\Response
Результат void

Описание свойств

$bootstrap защищенное свойство

protected Bootstrap,Neos\Flow\Core $bootstrap
Результат Neos\Flow\Core\Bootstrap

$componentContext защищенное свойство

protected ComponentContext,Neos\Flow\Http\Component $componentContext
Результат Neos\Flow\Http\Component\ComponentContext