Skip to content

Commit 03f202f

Browse files
committed
Add tests for reusing a placeholder
1 parent 6b794af commit 03f202f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Phpbb/TranslationValidator/Tests/LangKeyValidator/ValidateStringTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ public function validateStringData()
1919
array('String', 'foobar %s', 'foo %s bar', array()),
2020
array('2 strings', 'foobar %s %s', 'foo %1$s %2$s bar', array()),
2121
array('2 strings reordered', 'foobar %s %s', 'foo %2$s %1$s bar', array()),
22+
array('2 strings with reuse', 'foobar %s %s', 'foo %2$s %1$s bar %2$s', array()),
23+
array('2 strings with reuse/skip', 'foobar %s %s', 'foo %2$s bar %2$s', array(
24+
Output::FATAL . '-Should have 2 string arguments, but has 1--2 strings with reuse/skip',
25+
)),
2226
array('Integer', 'foobar %d', 'foo %d bar', array()),
2327
array('2 integers', 'foobar %d %d', 'foo %1$d %2$d bar', array()),
2428
array('2 integers reordered', 'foobar %d %d', 'foo %2$d %1$d bar', array()),

0 commit comments

Comments
 (0)