You are here

private function DataCollectorTranslatorTest::createCollector in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php \Symfony\Component\Translation\Tests\DataCollectorTranslatorTest::createCollector()
1 call to DataCollectorTranslatorTest::createCollector()
DataCollectorTranslatorTest::testCollectMessages in vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php

File

vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php, line 69

Class

DataCollectorTranslatorTest

Namespace

Symfony\Component\Translation\Tests

Code

private function createCollector() {
  $translator = new Translator('en');
  $translator
    ->addLoader('array', new ArrayLoader());
  $translator
    ->addResource('array', array(
    'foo' => 'foo (en)',
  ), 'en');
  $translator
    ->addResource('array', array(
    'bar' => 'bar (fr)',
  ), 'fr');
  $translator
    ->addResource('array', array(
    'bar_ru' => 'bar (ru)',
  ), 'ru');
  $collector = new DataCollectorTranslator($translator);
  return $collector;
}