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 LocoProviderTest extends ProviderTestCase
{ public static function createProvider(HttpClientInterface
$client, LoaderInterface
$loader, LoggerInterface
$logger, string
$defaultLocale, string
$endpoint, TranslatorBagInterface
$translatorBag = null
): ProviderInterface
{ return new LocoProvider($client,
$loader,
$logger,
$defaultLocale,
$endpoint,
$translatorBag ??
new TranslatorBag());
} public static function toStringProvider(): iterable
{ yield [ self::
createProvider((new MockHttpClient())->
withOptions([ 'base_uri' => 'https://localise.biz/api/',
'headers' =>
[ 'Authorization' => 'Loco API_KEY',
],
]),
new ArrayLoader(),
new NullLogger(), 'en', 'localise.biz/api/'
),