Skip to content

Commit ac383db

Browse files
committed
B2B-582: Update history log messages for Order Approvals
- test update
1 parent 96fb389 commit ac383db

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,10 @@ private function checkEmptyPhrases($phrase, &$missedPhraseErrors)
9898
private function checkArgumentMismatch($phrase, &$incorrectNumberOfArgumentsErrors)
9999
{
100100
if (preg_match_all('/%(\w+)/', $phrase['phrase'], $matches) || $phrase['arguments']) {
101-
$placeholderCount = count(array_unique($matches[1]));
102-
// count all occurrences of sprintf placeholders
103-
preg_match_all('/%([sducoxXbgGeEfF])/', $phrase['phrase'], $sprintfMatches);
104-
if (count($sprintfMatches[0]) > count(array_unique($sprintfMatches[0]))) {
105-
$placeholderCount = $placeholderCount + count($sprintfMatches[0]) - count(array_unique($sprintfMatches[0]));
106-
}
101+
$placeholderCount = count($matches[1]);
107102

108-
// Check for zend placeholders %placeholder% and sprintf placeholders
109-
if (preg_match_all('/%(([sducoxXbgGeEfF])|([A-Za-z]+)%)/', $phrase['phrase'], $placeHolders, PREG_OFFSET_CAPTURE)) {
103+
// Check for zend placeholders %placeholder% and sprintf placeholder %s
104+
if (preg_match_all('/%((s)|([A-Za-z]+)%)/', $phrase['phrase'], $placeHolders, PREG_OFFSET_CAPTURE)) {
110105
foreach ($placeHolders[0] as $ph) {
111106
// Check if char after placeholder is not a digit or letter
112107
$charAfterPh = $phrase['phrase'][$ph[1] + strlen($ph[0])];

0 commit comments

Comments
 (0)