findSnippetSetId example

$snippetService = new SnippetService(
            $this->connection,
            $this->snippetCollection,
            $this->createMock(EntityRepository::class),
            $this->createMock(EntityRepository::class),
            $this->createMock(EntityRepository::class),
            $this->createMock(SnippetFilterFactory::class),
            $this->createMock(ContainerInterface::class),
        );

        $snippetSetId = $snippetService->findSnippetSetId(Uuid::randomHex(), Uuid::randomHex(), 'en-GB');

        static::assertSame($snippetSetId$snippetSetIdWithSalesChannelDomain);
    }

    /** * @param array<string, string> $locales * * @dataProvider findSnippetSetIdDataProvider */
    public function testFindSnippetSetIdWithoutSalesChannelDomain(array $locales, string $id): void
    {
        

    private function isShopwareLocaleCatalogue(MessageCatalogueInterface $catalog): bool
    {
        return mb_strpos($catalog->getLocale(), '-') !== false;
    }

    private function resolveSnippetSetId(string $salesChannelId, string $languageId, string $locale): void
    {
        $snippetSetId = $this->snippetService->findSnippetSetId($salesChannelId$languageId$locale);

        $this->snippetSetId = $snippetSetId;
    }

    /** * Add language specific snippets provided by the admin */
    private function getCustomizedCatalog(MessageCatalogueInterface $catalog, ?string $fallbackLocale): MessageCatalogueInterface
    {
        try {
            $snippetSetId = $this->getSnippetSetId($catalog->getLocale());
        }
Home | Imprint | This part of the site doesn't use cookies.