use Symfony\Component\Translation\Provider\ProviderInterface;
use Symfony\Component\Translation\Test\ProviderTestCase;
use Symfony\Component\Translation\TranslatorBag;
use Symfony\Component\Translation\TranslatorBagInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;
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',
];