You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add support for reconfiguration during tests and fix issue with sqlite transactions
* Fixed nitpick CS
* Fixed docs, don't attempt to clear cookies since they won't get reloaded.
Copy file name to clipboardExpand all lines: src/Codeception/Module/Yii2.php
+78-58Lines changed: 78 additions & 58 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@
39
39
* * `fixturesMethod` - (default: _fixtures) Name of the method used for creating fixtures.
40
40
* * `responseCleanMethod` - (default: clear) Method for cleaning the response object. Note that this is only for multiple requests inside a single test case.
41
41
* Between test casesthe whole application is always recreated
42
-
* * `requestCleanMethod` - (default: clear) Method for cleaning the request object. Note that this is only for multiple requests inside a single test case.
42
+
* * `requestCleanMethod` - (default: recreate) Method for cleaning the request object. Note that this is only for multiple requests inside a single test case.
43
43
* Between test cases the whole application is always recreated
44
44
* You can use this module by setting params in your functional.suite.yml:
45
45
*
@@ -198,17 +198,16 @@ public function _initialize()
198
198
199
199
/**
200
200
* Module configuration changed inside a test.
201
-
* We might need to re-create the application.
201
+
* We always re-create the application.
202
202
*/
203
203
protectedfunctiononReconfigure()
204
204
{
205
205
parent::onReconfigure();
206
-
if (isset(\Yii::$app)) {
207
-
$this->client->restart();
208
-
}
206
+
$this->client->resetApplication();
207
+
$this->configureClient($this->config);
208
+
$this->client->startApp();
209
209
}
210
210
211
-
212
211
/**
213
212
* Adds the required server params.
214
213
* Note this is done separately from the request cycle since someone might call
@@ -254,8 +253,22 @@ protected function validateConfig()
0 commit comments