$urls =
$connection ->
fetchAllAssociative( 'SELECT LOWER(HEX(foreign_key)) as foreign_key, seo_path_info FROM seo_url WHERE route_name = :route AND foreign_key IN (:ids) AND sales_channel_id = :channel',
[ 'route' => TestProductSeoUrlRoute::ROUTE_NAME,
'ids' => Uuid::
fromHexToBytesList($ids->
getList(['parent', 'red', 'green'
])),
'channel' => Uuid::
fromHexToBytes($this->salesChannelId
),
],
['ids' => ArrayParameterType::STRING
] );
$urls = FetchModeHelper::
keyPair($urls);
static::
assertCount(3,
$urls);
static::
assertArrayHasKey($ids->
get('parent'
),
$urls);
static::
assertArrayHasKey($ids->
get('green'
),
$urls);
static::
assertArrayHasKey($ids->
get('red'
),
$urls);
// name = parent | number = parent
static::
assertEquals('parent/parent',
$urls[$ids->
get('parent'
)]);
// name = red | number = red
static::
assertEquals('red/red',
$urls[$ids->
get('red'
)]);