parent::
tearDown();
} protected function getProviderCollection(ProviderInterface
$provider, array
$providerNames =
['loco'
], array
$locales =
['en'
], array
$domains =
['messages'
]): TranslationProviderCollection
{ $collection =
[];
foreach ($providerNames as $providerName) { $collection[$providerName] =
new FilteringProvider($provider,
$locales,
$domains);
} return new TranslationProviderCollection($collection);
} protected function createYamlFile(array
$messages =
['node' => 'NOTE'
],
$targetLanguage = 'en',
$fileNamePattern = 'messages.%locale%.yml'
): string
{ $yamlContent = '';
foreach ($messages as $key =>
$value) { $yamlContent .= "
$key:
$value\n";
} $yamlContent .= "\n";
$filename =
sprintf('%s/%s',
$this->translationAppDir.'/translations',
str_replace('%locale%',
$targetLanguage,
$fileNamePattern));