diff --git a/apps/advanced/tests/codeception/config/functional.php b/apps/advanced/tests/codeception/config/functional.php index 1778b1cc04..c893ea24a7 100644 --- a/apps/advanced/tests/codeception/config/functional.php +++ b/apps/advanced/tests/codeception/config/functional.php @@ -3,5 +3,16 @@ * Application configuration shared by all applications functional tests */ return [ - + 'components' => [ + 'request' => [ + // it's not recommended to run functional tests with CSRF validation enabled + 'enableCsrfValidation' => false, + // but if you absolutely need it set cookie domain to localhost + /* + 'csrfCookie' => [ + 'domain' => 'localhost', + ], + */ + ], + ], ]; \ No newline at end of file diff --git a/apps/basic/tests/codeception/config/functional.php b/apps/basic/tests/codeception/config/functional.php index 499ad5a9c9..6d22bd97ba 100644 --- a/apps/basic/tests/codeception/config/functional.php +++ b/apps/basic/tests/codeception/config/functional.php @@ -9,6 +9,17 @@ return yii\helpers\ArrayHelper::merge( require(__DIR__ . '/../../../config/web.php'), require(__DIR__ . '/config.php'), [ - + 'components' => [ + 'request' => [ + // it's not recommended to run functional tests with CSRF validation enabled + 'enableCsrfValidation' => false, + // but if you absolutely need it set cookie domain to localhost + /* + 'csrfCookie' => [ + 'domain' => 'localhost', + ], + */ + ], + ], ] );