trait MakesHttpRequests (View source)

Properties

protected Client $client
protected array $server
protected bool $followRedirects
protected array $firewallLogins
protected bool $catchExceptions

Methods

get(string $uri, array $queryParameters = [])

No description

post(string $uri, array $parameters = [])

No description

getJson(string $uri, array $content = [])

No description

postJson(string $uri, array $content = [])

No description

request(string $method, string $uri, array $parameters = [], array $files = [], $content = null, bool $changeHistory = true)

No description

json(string $method, string $uri, array $content)

No description

followRedirect()

No description

submit(Form $form, array $values = [])

No description

withHeaders(array $headers)

No description

click(Link $link)

No description

loginAs(UserInterface $user, string $firewall = 'secured_area')

No description

initClient()

No description

TokenInterface
createUserToken(UserInterface $user, string $firewallName)

No description

array
getKernelOptions()

No description

Details

protected TestResponse get(string $uri, array $queryParameters = [])

Parameters

string $uri
array $queryParameters

Return Value

TestResponse

protected TestResponse post(string $uri, array $parameters = [])

Parameters

string $uri
array $parameters

Return Value

TestResponse

protected getJson(string $uri, array $content = [])

Parameters

string $uri
array $content

protected TestResponse postJson(string $uri, array $content = [])

Parameters

string $uri
array $content

Return Value

TestResponse

protected TestResponse request(string $method, string $uri, array $parameters = [], array $files = [], $content = null, bool $changeHistory = true)

Parameters

string $method
string $uri
array $parameters
array $files
$content
bool $changeHistory

Return Value

TestResponse

protected TestResponse json(string $method, string $uri, array $content)

Parameters

string $method
string $uri
array $content

Return Value

TestResponse

protected TestResponse followRedirect()

Return Value

TestResponse

protected TestResponse submit(Form $form, array $values = [])

Parameters

Form $form
array $values

Return Value

TestResponse

protected MakesHttpRequests withHeaders(array $headers)

Parameters

array $headers

Return Value

MakesHttpRequests

protected TestResponse click(Link $link)

Parameters

Link $link

Return Value

TestResponse

protected MakesHttpRequests followingRedirects()

Return Value

MakesHttpRequests

protected MakesHttpRequests loginAs(UserInterface $user, string $firewall = 'secured_area')

Parameters

UserInterface $user
string $firewall

Return Value

MakesHttpRequests

protected MakesHttpRequests catchExceptions()

Return Value

MakesHttpRequests

protected initClient()

protected TokenInterface createUserToken(UserInterface $user, string $firewallName)

Parameters

UserInterface $user
string $firewallName

Return Value

TokenInterface

abstract protected array getKernelOptions()

Return Value

array