File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ Release Date: Unreleased
1212BREAKING
1313********
1414
15+ - **FeatureTestTrait: ** When using :ref: `withBodyFormat() <feature-formatting-the-request >`,
16+ the priority of the request body has been changed.
17+ See :ref: `Upgrading Guide <upgrade-437-feature-testing >` for details.
18+
1519Message Changes
1620***************
1721
Original file line number Diff line number Diff line change @@ -18,6 +18,27 @@ Mandatory File Changes
1818Breaking Changes
1919****************
2020
21+ .. _upgrade-437-feature-testing :
22+
23+ Feature Testing Request Body
24+ ============================
25+
26+ If you call:
27+
28+ 1. :ref: `withBody() <feature-setting-the-body >`
29+ 2. and :ref: `withBodyFormat() <feature-formatting-the-request >`
30+ 3. and pass the ``$params `` to :ref: `call() <feature-requesting-a-page >` (or shorthand methods)
31+
32+ the priority for a Request body has been changed. In the unlikely event that you
33+ have test code affected by this change, modify it.
34+
35+ For example, now the ``$params `` is used to build the request body, and the ``$body ``
36+ is not used::
37+
38+ $this->withBody($body)->withBodyFormat('json')->call('post', $params)
39+
40+ Previously, the ``$body `` was used for the request body.
41+
2142Breaking Enhancements
2243*********************
2344
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ are called if you implement your own methods.
2121
2222.. literalinclude :: feature/001.php
2323
24+ .. _feature-requesting-a-page :
25+
2426Requesting a Page
2527=================
2628
@@ -32,7 +34,8 @@ To do this, you use the ``call()`` method.
32343. The third parameter ``$params `` accepts an array that is used to populate the
3335 superglobal variables for the HTTP verb you are using. So, a method of **GET **
3436 would have the **$_GET ** variable populated, while a **POST ** request would
35- have the **$_POST ** array populated.
37+ have the **$_POST ** array populated. The ``$params `` is also used in
38+ :ref: `feature-formatting-the-request `.
3639
3740 .. note :: The ``$params`` array does not make sense for every HTTP verb, but is
3841 included for consistency.
@@ -82,6 +85,8 @@ to send out emails. You can tell the system to skip any event handling with the
8285
8386.. literalinclude :: feature/007.php
8487
88+ .. _feature-formatting-the-request :
89+
8590Formatting the Request
8691-----------------------
8792
@@ -96,6 +101,8 @@ This will also set the `Content-Type` header for your request accordingly.
96101
97102.. literalinclude :: feature/008.php
98103
104+ .. _feature-setting-the-body :
105+
99106Setting the Body
100107----------------
101108
You can’t perform that action at this time.
0 commit comments