File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1071,6 +1071,13 @@ You can also override HTTP headers on a per request basis::
1071
1071
'HTTP_USER_AGENT' => 'MySuperBrowser/1.0',
1072
1072
]);
1073
1073
1074
+ .. caution ::
1075
+
1076
+ The name of your custom headers must follow the syntax defined in the
1077
+ `section 4.1.18 of RFC 3875 `_: replace ``- `` by ``_ ``, transform it into
1078
+ uppercase and prefix the result with ``HTTP_ ``. For example, if your
1079
+ header name is ``X-Session-Token ``, pass ``HTTP_X_SESSION_TOKEN ``.
1080
+
1074
1081
.. tip ::
1075
1082
1076
1083
The test client is available as a service in the container in the ``test ``
@@ -1166,3 +1173,4 @@ Learn more
1166
1173
.. _`$_SERVER` : https://www.php.net/manual/en/reserved.variables.server.php
1167
1174
.. _`data providers` : https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.data-providers
1168
1175
.. _`code coverage analysis` : https://phpunit.readthedocs.io/en/9.1/code-coverage-analysis.html
1176
+ .. _`section 4.1.18 of RFC 3875` : https://tools.ietf.org/html/rfc3875#section-4.1.18
You can’t perform that action at this time.
0 commit comments