->
willReturn(new MessageCatalogue($locale));
$provider = self::
createProvider((new MockHttpClient(new MockResponse($responseContent)))->
withOptions([ 'base_uri' => 'https://localise.biz/api/',
'headers' =>
[ 'Authorization' => 'Loco API_KEY',
],
]),
$loader,
new NullLogger(), 'en', 'localise.biz/api/'
);
$translatorBag =
$provider->
read([$domain],
[$locale]);
// We don't want to assert equality of metadata here, due to the ArrayLoader usage.
foreach ($translatorBag->
getCatalogues() as $catalogue) { $catalogue->
deleteMetadata('', ''
);
} $this->
assertEquals($expectedTranslatorBag->
getCatalogues(),
$translatorBag->
getCatalogues());
} /**
* @dataProvider getResponsesForManyLocalesAndManyDomains
*/
public function testReadForManyLocalesAndManyDomains(array
$locales, array
$domains, array
$responseContents, TranslatorBag
$expectedTranslatorBag) { $responses =
[];