$this->productListingCMSElementResolver->
enrich($slot,
$resolverContext,
$result);
/** @var ProductListingStruct $data */
$data =
$slot->
getData();
/** @var ProductListingResult $listing */
$listing =
$data->
getListing();
static::
assertEquals('name-asc',
$listing->
getSorting());
if ($availableSortings) { foreach ($listing->
getAvailableSortings() as $availableSorting) { static::
assertArrayHasKey($availableSorting->
getKey(),
$availableSortings);
} } } public function testUnavailableSortingThrowsException(): void
{ $slotConfig =
[ 'availableSortings' =>
[ 'value' =>
[ 'price-desc' => 1,