You are here

public function TranslatorTest::testTrans in Zircon Profile 8.0

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

@dataProvider getTransTests

File

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

Class

TranslatorTest

Namespace

Symfony\Component\Translation\Tests

Code

public function testTrans($expected, $id, $translation, $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
    ->trans($id, $parameters, $domain, $locale));
}