Skip to content

Commit d944b33

Browse files
committed
B2B-582: Update history log messages for Order Approvals
- test updates
1 parent 4bd580b commit d944b33

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

dev/tests/integration/testsuite/Magento/Framework/Mail/EmailMessageTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
use PHPUnit\Framework\TestCase;
1414

1515
/**
16-
* Class EmailMessageTest
16+
* Test Email Messages
17+
*
1718
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1819
*/
1920
class EmailMessageTest extends TestCase

dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/ArgumentsTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,17 @@ private function checkArgumentMismatch($phrase, &$incorrectNumberOfArgumentsErro
102102
// count all occurrences of sprintf placeholders
103103
preg_match_all('/%\b([sducoxXbgGeEfF])\b/', $phrase['phrase'], $sprintfMatches);
104104
if (count($sprintfMatches[0]) > count(array_unique($sprintfMatches[0]))) {
105-
$placeholderCount = $placeholderCount + count($sprintfMatches[0]) - count(array_unique($sprintfMatches[0]));
105+
$placeholderCount = $placeholderCount +
106+
count($sprintfMatches[0]) - count(array_unique($sprintfMatches[0]));
106107
}
107108

108-
// Check for zend placeholders %placeholder% and sprintf placeholders
109-
if (preg_match_all('/%\b(([sducoxXbgGeEfF])\b|([A-Za-z]+)%)/', $phrase['phrase'], $placeHolders, PREG_OFFSET_CAPTURE)) {
109+
// Check for zend placeholders %placeholder% and sprintf placeholders and remove from the count
110+
if (preg_match_all(
111+
'/%\b(([sducoxXbgGeEfF])\b|([A-Za-z]+)%)/',
112+
$phrase['phrase'],
113+
$placeHolders,
114+
PREG_OFFSET_CAPTURE
115+
)) {
110116
foreach ($placeHolders[0] as $ph) {
111117
// Check if char after placeholder is not a digit or letter
112118
$charAfterPh = $phrase['phrase'][$ph[1] + strlen($ph[0])];

0 commit comments

Comments
 (0)