Request::METHOD_POST,
];
yield 'Test GET filter will be generated with min and max price' =>
[ new Request(['min-price' => 10.0, 'max-price' => 20.0
]),
self::
create(true,
new RangeFilter('product.cheapestPrice',
[RangeFilter::GTE => 10.0, RangeFilter::LTE => 20.0
]),
['min' => 10.0, 'max' => 20.0
]),
];
} private static function create(bool
$filtered, DALFilter
$filter, mixed
$values): Filter
{ $aggregations =
[new StatsAggregation('price', 'product.cheapestPrice', true, true, false, false
)];
return new Filter('price',
$filtered,
$aggregations,
$filter,
$values);
}}