$this->seoUrlRepository =
$this->
getContainer()->
get('seo_url.repository'
);
$this->salesChannelSeoUrlRepository =
$this->
getContainer()->
get('sales_channel.seo_url.repository'
);
} public function testOnlyCanonical(): void
{ $canonicalId = Uuid::
randomHex();
$oldId = Uuid::
randomHex();
$foreignKey = Uuid::
randomHex();
$salesChannelContext =
$this->
createStorefrontSalesChannelContext(Uuid::
randomHex(), 'test'
);
$this->seoUrlRepository->
create( [ [ 'id' =>
$canonicalId,
'languageId' => Defaults::LANGUAGE_SYSTEM,
'salesChannelId' => null,
'routeName' => 'test',
'foreignKey' =>
$foreignKey,
'pathInfo' => '/detail/1234',
'seoPathInfo' => '/canonical',