HttpKernelBrowser
extends AbstractBrowser
in package
Simulates a browser and makes requests to an HttpKernel instance.
Tags
Table of Contents
- $kernel : mixed
- $catchExceptions : mixed
- __construct() : mixed
- catchExceptions() : mixed
- Sets whether to catch exceptions when the kernel is handling a request.
- getRequest() :
- getResponse() :
- doRequest() : Response
- {@inheritdoc}
- filterFiles() : array<string|int, mixed>
- Filters an array of files.
- filterRequest() : Request
- {@inheritdoc}
- filterResponse() : Response
- {@inheritdoc}
- getHandleScript() : mixed
- getScript() : string
- {@inheritdoc}
Properties
$kernel
protected
mixed
$kernel
$catchExceptions
private
mixed
$catchExceptions
= true
Methods
__construct()
public
__construct(HttpKernelInterface $kernel[, array<string|int, mixed> $server = [] ][, History|null $history = null ][, CookieJar|null $cookieJar = null ]) : mixed
Parameters
- $kernel : HttpKernelInterface
- $server : array<string|int, mixed> = []
-
The server parameters (equivalent of $_SERVER)
- $history : History|null = null
- $cookieJar : CookieJar|null = null
Return values
mixed —catchExceptions()
Sets whether to catch exceptions when the kernel is handling a request.
public
catchExceptions(bool $catchExceptions) : mixed
Parameters
- $catchExceptions : bool
Return values
mixed —getRequest()
public
getRequest() :
Return values
—getResponse()
public
getResponse() :
Return values
—doRequest()
{@inheritdoc}
protected
doRequest(Request $request) : Response
Parameters
- $request : Request
Return values
Response —filterFiles()
Filters an array of files.
protected
filterFiles(array<string|int, mixed> $files) : array<string|int, mixed>
This method created test instances of UploadedFile so that the move() method can be called on those instances.
If the size of a file is greater than the allowed size (from php.ini) then an invalid UploadedFile is returned with an error set to UPLOAD_ERR_INI_SIZE.
Parameters
- $files : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —filterRequest()
{@inheritdoc}
protected
filterRequest(Request $request) : Request
Parameters
- $request : Request
Return values
Request —filterResponse()
{@inheritdoc}
protected
filterResponse(Response $response) : Response
Parameters
- $response : Response
Return values
Response —getHandleScript()
protected
getHandleScript() : mixed
Return values
mixed —getScript()
{@inheritdoc}
protected
getScript(Request $request) : string
Parameters
- $request : Request