File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ TestSuite
138
138
its methods were updated to be static.
139
139
- ``LogTestTrait `` was added. This new trait makes it easy to capture logs in
140
140
your tests and make assertions on the presence or absence of log messages.
141
+ - ``IntegrationTestTrait::replaceRequest() `` was added.
141
142
142
143
Utility
143
144
-------
Original file line number Diff line number Diff line change @@ -1098,13 +1098,22 @@ to configure the requests you will send to your application under test::
1098
1098
// Set session data
1099
1099
$this->session(['Auth.User.id' => 1]);
1100
1100
1101
- // Configure headers
1101
+ // Configure headers and merge with the existing request
1102
1102
$this->configRequest([
1103
1103
'headers' => ['Accept' => 'application/json']
1104
1104
]);
1105
1105
1106
+ // Replace the existing request. Added in 5.1.0
1107
+ $this->replaceRequest([
1108
+ 'headers' => ['Accept' => 'application/json']
1109
+ ]);
1110
+
1111
+
1106
1112
The state set by these helper methods is reset in the ``tearDown() `` method.
1107
1113
1114
+ .. versionadded :: 5.1.0
1115
+ ``replaceRequest() `` was added.
1116
+
1108
1117
Testing Actions Protected by CsrfComponent or SecurityComponent
1109
1118
---------------------------------------------------------------
1110
1119
You can’t perform that action at this time.
0 commit comments