Skip to content

Commit

Permalink
Merge pull request #12 from magento-commerce/MQE-2391
Browse files Browse the repository at this point in the history
MQE-2391: [GitHub Issue] Magento fails with xdebug 3 due to mftf
  • Loading branch information
jilu1 committed Nov 25, 2020
2 parents 57fb32e + 6d6a7c5 commit f99fbbc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
7 changes: 0 additions & 7 deletions dev/tests/functional/standalone_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,3 @@

$RELATIVE_TESTS_MODULE_PATH = '/tests/functional/tests/MFTF';
defined('TESTS_MODULE_PATH') || define('TESTS_MODULE_PATH', realpath(TESTS_BP . $RELATIVE_TESTS_MODULE_PATH));


// add the debug flag here
$debug_mode = $_ENV['MFTF_DEBUG'] ?? false;
if (!(bool)$debug_mode && extension_loaded('xdebug')) {
xdebug_disable();
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,15 @@ private function __construct(

$this->phase = $phase;
$this->verboseEnabled = $verboseEnabled;
if (isset($debugLevel) && !in_array(strtolower($debugLevel), self::MFTF_DEBUG_LEVEL)) {
if (!in_array(strtolower($debugLevel), self::MFTF_DEBUG_LEVEL)) {
throw new TestFrameworkException("{$debugLevel} is not a debug level. Use 'DEFAULT' or 'DEVELOPER'");
}
switch (strtolower($debugLevel)) {
case self::LEVEL_DEVELOPER:
case self::LEVEL_DEFAULT:
$this->debugLevel = $debugLevel;
$this->debugLevel = self::LEVEL_DEFAULT;
break;
case null:
default:
$this->debugLevel = self::LEVEL_DEVELOPER;
break;
}
$this->allowSkipped = $allowSkipped;
$this->filterList = new FilterList($filters);
Expand Down Expand Up @@ -196,7 +194,7 @@ public function verboseEnabled()
*/
public function getDebugLevel()
{
return $this->debugLevel ?? getenv('MFTF_DEBUG');
return $this->debugLevel;
}

/**
Expand Down
6 changes: 0 additions & 6 deletions src/Magento/FunctionalTestingFramework/_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,3 @@
'TESTS_MODULE_PATH',
realpath(TESTS_BP . $RELATIVE_TESTS_MODULE_PATH)
);

// add the debug flag here
$debugMode = $_ENV['MFTF_DEBUG'] ?? false;
if (!(bool)$debugMode && extension_loaded('xdebug')) {
xdebug_disable();
}

0 comments on commit f99fbbc

Please sign in to comment.