public function TranslatorTest::testTransValidLocale in Plug 7
@dataProvider getValidLocalesTests
File
- lib/
Symfony/ translation/ Tests/ TranslatorTest.php, line 304
Class
Namespace
Symfony\Component\Translation\TestsCode
public function testTransValidLocale($locale) {
$translator = new Translator($locale, new MessageSelector());
$translator
->addLoader('array', new ArrayLoader());
$translator
->addResource('array', array(
'test' => 'OK',
), $locale);
$this
->assertEquals('OK', $translator
->trans('test'));
$this
->assertEquals('OK', $translator
->trans('test', array(), null, $locale));
}