You are here

protected function PluralizationRulesTest::generateTestData in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/translation/Tests/PluralizationRulesTest.php \Symfony\Component\Translation\Tests\PluralizationRulesTest::generateTestData()
2 calls to PluralizationRulesTest::generateTestData()
PluralizationRulesTest::testFailedLangcodes in vendor/symfony/translation/Tests/PluralizationRulesTest.php
We test failed langcode here.
PluralizationRulesTest::testLangcodes in vendor/symfony/translation/Tests/PluralizationRulesTest.php
@dataProvider successLangcodes

File

vendor/symfony/translation/Tests/PluralizationRulesTest.php, line 111

Class

PluralizationRulesTest
Test should cover all languages mentioned on http://translate.sourceforge.net/wiki/l10n/pluralforms and Plural forms mentioned on http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms.

Namespace

Symfony\Component\Translation\Tests

Code

protected function generateTestData($plural, $langCodes) {
  $matrix = array();
  foreach ($langCodes as $langCode) {
    for ($count = 0; $count < 200; ++$count) {
      $plural = PluralizationRules::get($count, $langCode);
      $matrix[$langCode][$count] = $plural;
    }
  }
  return $matrix;
}