Commit 5b4fe974 authored by alexpott's avatar alexpott

Issue #3019706 by hchonov, alexpott, sheanhoxie, jibran, dawehner: Functional...

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 32dfb620)
parent b1e2d9ab
...@@ -238,12 +238,6 @@ protected function initMink() { ...@@ -238,12 +238,6 @@ protected function initMink() {
'hidden_field_selector' => new HiddenFieldSelector(), 'hidden_field_selector' => new HiddenFieldSelector(),
]); ]);
$session = new Session($driver, $selectors_handler); $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 = new Mink();
$this->mink->registerSession('default', $session); $this->mink->registerSession('default', $session);
$this->mink->setDefaultSessionName('default'); $this->mink->setDefaultSessionName('default');
...@@ -251,6 +245,16 @@ protected function initMink() { ...@@ -251,6 +245,16 @@ protected function initMink() {
$this->initFrontPage(); $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; return $session;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment