createCategoryWithoutSeoUrl example

static::assertStringNotContainsString('category.indexer', $message);
    }

    public function testExecuteWithSkipSeoUpdaterOption(): void
    {
        if (!$this->getContainer()->has(NavigationPageSeoUrlRoute::class)) {
            static::markTestSkipped('SeoUrl tests need storefront bundle to be installed');
        }
        $repo = $this->getContainer()->get('seo_url.repository');
        $context = Context::createDefaultContext();
        $skip = 'sales_channel.indexer,customer.indexer,landing_page.indexer,payment_method.indexer,media.indexer,media_folder_configuration.indexer';
        $categoryA = $this->createCategoryWithoutSeoUrl();

        $commandTester = new CommandTester($this->refreshIndexCommand);
        $commandTester->execute(['--skip' => $skip]);

        $seoUrl = $repo->search(
            (new Criteria())->addFilter(new EqualsFilter('pathInfo', sprintf('/navigation/%s', $categoryA))),
            $context
        )->first();

        static::assertNotNull($seoUrl);

        
Home | Imprint | This part of the site doesn't use cookies.