Skip to content

Commit 82afa08

Browse files
authored
Merge branch 'develop' into ACQE-5843
2 parents f7805f1 + 0654ac6 commit 82afa08

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
Magento Functional Testing Framework Changelog
22
================================================
3+
4.5.0
4+
---------
5+
### Enhancements
6+
* Increase browser resolution to 1920x1080.
7+
* Add metadata to ACQE Repositories.
8+
* Add magento admin password to credentials example.
9+
10+
### Fixes
11+
* Fixed test failure while running any test suite with an argument.
312

413
4.4.2
514
---------

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento2-functional-testing-framework",
33
"description": "Magento2 Functional Testing Framework",
44
"type": "library",
5-
"version": "4.4.2",
5+
"version": "4.5.0",
66
"license": "AGPL-3.0",
77
"keywords": ["magento", "automation", "functional", "testing"],
88
"config": {

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etc/config/command.php

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,16 @@
4646
$idleTimeout = true;
4747
}
4848

49-
if (checkForFilePath($output)) {
50-
$output = "CLI output suppressed, filepath detected in output.";
51-
}
52-
5349
$exitCode = $process->getExitCode();
5450

5551
if ($process->isSuccessful() || $idleTimeout) {
5652
http_response_code(202);
5753
} else {
5854
http_response_code(500);
5955
}
60-
echo $output;
56+
57+
// Suppress file paths from output
58+
echo suppressFilePaths($output);
6159
} else {
6260
http_response_code(403);
6361
echo "Given command not found valid in Magento CLI Command list.";
@@ -115,11 +113,21 @@ function trimAfterWhitespace($string)
115113
}
116114

117115
/**
118-
* Detects file path in string.
116+
* Suppress file paths in string.
119117
* @param string $string
120-
* @return boolean
118+
* @return string
121119
*/
122-
function checkForFilePath($string)
120+
function suppressFilePaths(string $string): string
123121
{
124-
return preg_match('/\/[\S]+\//', $string);
122+
// Match file paths on both *nix and Windows system
123+
$filePathPattern = '~(?:[A-Za-z]:[\\\/]|\\\\|\/)\S+~';
124+
$replacement = '[suppressed_path]';
125+
126+
preg_match_all($filePathPattern, $string, $matches);
127+
if (!empty($matches)) {
128+
foreach ($matches[0] as $match) {
129+
$string = str_replace($match, $replacement, $string);
130+
}
131+
}
132+
return $string;
125133
}

0 commit comments

Comments
 (0)