LocaleProvider example

/** * @package merchant-services * * @internal * * @covers \Shopware\Core\Framework\Store\Authentication\LocaleProvider */
class LocaleProviderTest extends TestCase
{
    public function testGetLocaleFromContextReturnsEnGbInSystemSource(): void
    {
        $provider = new LocaleProvider(static::createMock(EntityRepository::class));

        static::assertEquals('en-GB', $provider->getLocaleFromContext(Context::createDefaultContext()));
    }

    public function testGetLocaleFromContextReturnsEnGbIfNoUserIsAssociated(): void
    {
        $provider = new LocaleProvider(static::createMock(EntityRepository::class));

        static::assertEquals(
            'en-GB',
            $provider->getLocaleFromContext(Context::createDefaultContext(
                
Home | Imprint | This part of the site doesn't use cookies.