Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions book/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,17 +235,19 @@ document::
)

The ``server`` array is the raw values that you'd expect to normally
find in the PHP `$_SERVER`_ superglobal. For example, to set the `Content-Type`
and `Referer` HTTP headers, you'd pass the following::
find in the PHP `$_SERVER`_ superglobal. For example, to set the `Content-Type`,
`Referer` and `X-Requested-With' HTTP headers, you'd pass the following (mind
the `HTTP_` prefix for non standard headers)::

$client->request(
'GET',
'/demo/hello/Fabien',
array(),
array(),
array(
'CONTENT_TYPE' => 'application/json',
'HTTP_REFERER' => '/foo/bar',
'CONTENT_TYPE' => 'application/json',
'HTTP_REFERER' => '/foo/bar',
'HTTP_X-Requested-With' => 'XMLHttpRequest',
)
);

Expand Down