public function testLinkType(?string
$type, string
$route): void
{ $category =
new CategoryEntity();
$category->
setType(CategoryDefinition::TYPE_LINK
);
$category->
setLinkType($type);
$category->
addTranslated('linkType',
$type);
static::
assertNull($this->urlGenerator->
generate($category,
$this->salesChannel
));
$category->
setExternalLink(self::EXTERNAL_URL
);
$category->
addTranslated('externalLink',
$category->
getExternalLink());
$category->
setInternalLink(Uuid::
randomHex());
$category->
addTranslated('internalLink',
$category->
getInternalLink());
static::
assertSame($route,
$this->urlGenerator->
generate($category,
$this->salesChannel
));
} public static function dataProviderLinkTypes(): array
{ return [ [CategoryDefinition::LINK_TYPE_PRODUCT, 'frontend.detail.page'
],
[CategoryDefinition::LINK_TYPE_CATEGORY, 'frontend.navigation.page'
],
[