getInternalLink example

static::assertNull($this->urlGenerator->generate($category$this->salesChannel));
    }

    public function testLinkCategoryHome(): void
    {
        $category = new CategoryEntity();
        $category->setType(CategoryDefinition::TYPE_LINK);
        $category->setLinkType(CategoryDefinition::LINK_TYPE_CATEGORY);
        $category->addTranslated('linkType', CategoryDefinition::LINK_TYPE_CATEGORY);
        $category->setInternalLink(Uuid::randomHex());
        $category->addTranslated('internalLink', $category->getInternalLink());
        $this->salesChannel->setNavigationCategoryId($category->getInternalLink());

        static::assertSame('frontend.home.page', $this->urlGenerator->generate($category$this->salesChannel));
    }

    /** * @dataProvider dataProviderLinkTypes */
    public function testLinkType(?string $type, string $route): void
    {
        $category = new CategoryEntity();
        
Home | Imprint | This part of the site doesn't use cookies.