Skip to content

Commit 54e47b8

Browse files
committed
Issue #3019706 by hchonov, jibran: Functional JS Tests are broken if XDEBUG_CONFIG is set as an env variable
(cherry picked from commit 6248e44)
1 parent 2daa8fe commit 54e47b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/Drupal/Tests/BrowserTestBase.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,11 @@ protected function initMink() {
239239
]);
240240
$session = new Session($driver, $selectors_handler);
241241
$cookies = $this->extractCookiesFromRequest(\Drupal::request());
242+
// If there are any cookies, then first start the session before setting
243+
// them.
244+
if ($cookies && !$session->isStarted()) {
245+
$session->start();
246+
}
242247
foreach ($cookies as $cookie_name => $values) {
243248
foreach ($values as $value) {
244249
$session->setCookie($cookie_name, $value);

0 commit comments

Comments
 (0)