summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAlex Pott2018-12-18 20:47:50 (GMT)
committerAlex Pott2018-12-18 20:47:58 (GMT)
commit5b4fe974de636bf5a5e8cd8781bf26c148da64cb (patch)
tree2c8816e71851d28713f2697e85bab5f7966167fd /core
parentb1e2d9abdc535fea9ed3ec24d12393d65ee8cfe6 (diff)
Issue #3019706 by hchonov, alexpott, sheanhoxie, jibran, dawehner: Functional JS Tests are broken if XDEBUG_CONFIG is set as an env variable
(cherry picked from commit 32dfb620d3a674c2a1127242ace2e433c63e73d7)
Diffstat (limited to 'core')
-rw-r--r--core/tests/Drupal/Tests/BrowserTestBase.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index 5417edc..204eacb 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -238,12 +238,6 @@ abstract class BrowserTestBase extends TestCase {
'hidden_field_selector' => new HiddenFieldSelector(),
]);
$session = new Session($driver, $selectors_handler);
- $cookies = $this->extractCookiesFromRequest(\Drupal::request());
- foreach ($cookies as $cookie_name => $values) {
- foreach ($values as $value) {
- $session->setCookie($cookie_name, $value);
- }
- }
$this->mink = new Mink();
$this->mink->registerSession('default', $session);
$this->mink->setDefaultSessionName('default');
@@ -251,6 +245,16 @@ abstract class BrowserTestBase extends TestCase {
$this->initFrontPage();
+ // Copies cookies from the current environment, for example, XDEBUG_SESSION
+ // in order to support Xdebug.
+ // @see BrowserTestBase::initFrontPage()
+ $cookies = $this->extractCookiesFromRequest(\Drupal::request());
+ foreach ($cookies as $cookie_name => $values) {
+ foreach ($values as $value) {
+ $session->setCookie($cookie_name, $value);
+ }
+ }
+
return $session;
}