diff --git a/dev/tests/functional/standalone_bootstrap.php b/dev/tests/functional/standalone_bootstrap.php index 58030231d..5ce6f029a 100755 --- a/dev/tests/functional/standalone_bootstrap.php +++ b/dev/tests/functional/standalone_bootstrap.php @@ -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(); -} diff --git a/src/Magento/FunctionalTestingFramework/Config/MftfApplicationConfig.php b/src/Magento/FunctionalTestingFramework/Config/MftfApplicationConfig.php index ab06b5612..3aad73a06 100644 --- a/src/Magento/FunctionalTestingFramework/Config/MftfApplicationConfig.php +++ b/src/Magento/FunctionalTestingFramework/Config/MftfApplicationConfig.php @@ -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); @@ -196,7 +194,7 @@ public function verboseEnabled() */ public function getDebugLevel() { - return $this->debugLevel ?? getenv('MFTF_DEBUG'); + return $this->debugLevel; } /** diff --git a/src/Magento/FunctionalTestingFramework/_bootstrap.php b/src/Magento/FunctionalTestingFramework/_bootstrap.php index b655fb28e..9c13eaa54 100644 --- a/src/Magento/FunctionalTestingFramework/_bootstrap.php +++ b/src/Magento/FunctionalTestingFramework/_bootstrap.php @@ -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(); -}