summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAlex Pott2018-12-18 16:14:49 (GMT)
committerAlex Pott2018-12-18 16:14:56 (GMT)
commit14fa028c43918aeae4348b1cb98caac3afd83310 (patch)
tree3e57618c9a357860aaa16ddb5c803e0fafab7b99 /core
parent12173dcf795bad1c4675e53647b7cb3d6baec79f (diff)
Issue #3019706 by hchonov, jibran: Functional JS Tests are broken if XDEBUG_CONFIG is set as an env variable
(cherry picked from commit 6248e44d0859e0812ae30be7da3931484748ee05)
Diffstat (limited to 'core')
-rw-r--r--core/tests/Drupal/Tests/BrowserTestBase.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index 5417edc..64b0f89 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -239,6 +239,11 @@ abstract class BrowserTestBase extends TestCase {
]);
$session = new Session($driver, $selectors_handler);
$cookies = $this->extractCookiesFromRequest(\Drupal::request());
+ // If there are any cookies, then first start the session before setting
+ // them.
+ if ($cookies && !$session->isStarted()) {
+ $session->start();
+ }
foreach ($cookies as $cookie_name => $values) {
foreach ($values as $value) {
$session->setCookie($cookie_name, $value);