public function TranslationManagerTest::providerTestFormatPlural in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php \Drupal\Tests\Core\StringTranslation\TranslationManagerTest::providerTestFormatPlural()
Provides some test data for formatPlural()
Return value
array
File
- core/
tests/ Drupal/ Tests/ Core/ StringTranslation/ TranslationManagerTest.php, line 38 - Contains \Drupal\Tests\Core\StringTranslation\TranslationManagerTest.
Class
- TranslationManagerTest
- @coversDefaultClass \Drupal\Core\StringTranslation\TranslationManager @group StringTranslation
Namespace
Drupal\Tests\Core\StringTranslationCode
public function providerTestFormatPlural() {
return [
[
1,
'Singular',
'@count plural',
[],
[],
'Singular',
],
[
2,
'Singular',
'@count plural',
[],
[],
'2 plural',
],
// @todo support locale_get_plural
[
2,
'Singular',
'@count @arg',
[
'@arg' => '<script>',
],
[],
'2 <script>',
],
[
2,
'Singular',
'@count %arg',
[
'%arg' => '<script>',
],
[],
'2 <em class="placeholder"><script></em>',
],
[
1,
'Singular',
'@count plural',
[],
[
'langcode' => NULL,
],
'Singular',
],
[
1,
'Singular',
'@count plural',
[],
[
'langcode' => 'es',
],
'Singular',
],
];
}