You are here

public function TranslatorTest::testTransChoice in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/Tests/TranslatorTest.php \Symfony\Component\Translation\Tests\TranslatorTest::testTransChoice()

@dataProvider getTransChoiceTests

File

vendor/symfony/translation/Tests/TranslatorTest.php, line 329

Class

TranslatorTest

Namespace

Symfony\Component\Translation\Tests

Code

public function testTransChoice($expected, $id, $translation, $number, $parameters, $locale, $domain) {
  $translator = new Translator('en');
  $translator
    ->addLoader('array', new ArrayLoader());
  $translator
    ->addResource('array', array(
    (string) $id => $translation,
  ), $locale, $domain);
  $this
    ->assertEquals($expected, $translator
    ->transChoice($id, $number, $parameters, $domain, $locale));
}