assertDictionary example


    public function testItUpdatesKeywordsAndDictionary(array $productData, IdsCollection $ids, array $englishKeywords, array $germanKeywords, array $additionalDictionaries = []): void
    {
        $this->productRepository->create([$productData], Context::createDefaultContext());

        $this->assertKeywords($ids->get('1000'), Defaults::LANGUAGE_SYSTEM, $englishKeywords);
        $this->assertKeywords($ids->get('1000')$this->getDeDeLanguageId()$germanKeywords);

        $expectedDictionary = array_merge($englishKeywords$additionalDictionaries);
        sort($expectedDictionary);
        $this->assertDictionary(Defaults::LANGUAGE_SYSTEM, $expectedDictionary);
        $expectedDictionary = array_merge($germanKeywords$additionalDictionaries);
        sort($expectedDictionary);
        $this->assertDictionary($this->getDeDeLanguageId()$expectedDictionary);
    }

    /** * @param array<mixed> $productData * @param string[] $englishKeywords * @param string[] $germanKeywords * @param string[] $additionalDictionaries * * @dataProvider productKeywordProvider */
Home | Imprint | This part of the site doesn't use cookies.