diff --git a/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php b/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php index 2b282a963..4ce3c83d3 100644 --- a/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php +++ b/src/Magento/FunctionalTestingFramework/StaticCheck/ClassFileNamingCheck.php @@ -96,7 +96,7 @@ public function execute(InputInterface $input) StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::ERROR_LOG_FILENAME . '.txt', self::ERROR_LOG_MESSAGE ); - if (!empty($this->warnings)) { + if (!empty($this->warnings) && !empty($this->errors)) { $this->output .= "\n " . $this->scriptUtil->printWarningsToFile( $this->warnings, StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::WARNING_LOG_FILENAME . '.txt', diff --git a/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php b/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php index f7bfdeb72..01660c427 100644 --- a/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php +++ b/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php @@ -155,7 +155,7 @@ public function execute(InputInterface $input) StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::ERROR_LOG_FILENAME . '.txt', self::ERROR_LOG_MESSAGE ); - if (!empty($this->warnings)) { + if (!empty($this->warnings) && !empty($this->errors)) { $this->output .= "\n " . $this->scriptUtil->printWarningsToFile( $this->warnings, StaticChecksList::getErrorFilesPath() . DIRECTORY_SEPARATOR . self::WARNING_LOG_FILENAME . '.txt',