Skip to content

Commit 522878e

Browse files
committed
B2B-582: Update history log messages for Order Approvals
- fix integrity test to allow for multiple sprintf placeholders
1 parent f442fa9 commit 522878e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ private function checkArgumentMismatch($phrase, &$incorrectNumberOfArgumentsErro
9999
{
100100
if (preg_match_all('/%(\w+)/', $phrase['phrase'], $matches) || $phrase['arguments']) {
101101
$placeholderCount = count(array_unique($matches[1]));
102+
// count all occurrences of %s
103+
preg_match_all('/%s/', $phrase['phrase'], $sprintfMatches);
104+
if (count($sprintfMatches[0]) > 1) {
105+
$placeholderCount = $placeholderCount + count($sprintfMatches[0]) - 1;
106+
}
102107

103108
// Check for zend placeholders %placeholder% and sprintf placeholder %s
104109
if (preg_match_all('/%((s)|([A-Za-z]+)%)/', $phrase['phrase'], $placeHolders, PREG_OFFSET_CAPTURE)) {

0 commit comments

Comments
 (0)