class CrowdinProviderTest extends ProviderTestCase
{ public static function createProvider(HttpClientInterface
$client, LoaderInterface
$loader, LoggerInterface
$logger, string
$defaultLocale, string
$endpoint, TranslatorBagInterface
$translatorBag = null
): ProviderInterface
{ return new CrowdinProvider($client,
$loader,
$logger,
new XliffFileDumper(),
$defaultLocale,
$endpoint);
} public static function toStringProvider(): iterable
{ yield [ self::
createProvider((new MockHttpClient())->
withOptions([ 'base_uri' => 'https://api.crowdin.com/api/v2/projects/1/',
'auth_bearer' => 'API_TOKEN',
]),
new ArrayLoader(),
new NullLogger(), 'en', 'api.crowdin.com'
),
'crowdin://api.crowdin.com',
];
yield [ self::
createProvider((new MockHttpClient())->
withOptions([ 'base_uri' => 'https://domain.api.crowdin.com/api/v2/projects/1/',
'auth_bearer' => 'API_TOKEN',
]),
new ArrayLoader(),
new NullLogger(), 'en', 'domain.api.crowdin.com'
),