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 LokaliseProviderTest extends ProviderTestCase
{ public static function createProvider(HttpClientInterface
$client, LoaderInterface
$loader, LoggerInterface
$logger, string
$defaultLocale, string
$endpoint, TranslatorBagInterface
$translatorBag = null
): ProviderInterface
{ return new LokaliseProvider($client,
$loader,
$logger,
$defaultLocale,
$endpoint);
} public static function toStringProvider(): iterable
{ yield [ self::
createProvider((new MockHttpClient())->
withOptions([ 'base_uri' => 'https://api.lokalise.com/api2/projects/PROJECT_ID/',
'headers' =>
['X-Api-Token' => 'API_KEY'
],
]),
new ArrayLoader(),
new NullLogger(), 'en', 'api.lokalise.com'
),
'lokalise://api.lokalise.com',
];