$category =
new CategoryEntity();
$category->
setType(CategoryDefinition::TYPE_FOLDER
);
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
{