public static function unknownSortingProvider(): \Generator
{ yield 'Requested unknown sorting will throw exception' =>
['unknown'
];
yield 'Requested empty sorting will throw exception' =>
[''
];
yield 'Requested null sorting will throw exception' =>
[null
];
yield 'Requested empty array sorting will throw exception' =>
[[]];
} private function buildSortings(): ProductSortingCollection
{ return new ProductSortingCollection([ (new ProductSortingEntity())->
assign([ '_uniqueIdentifier' => 'foo',
'key' => 'foo',
'fields' =>
[ ['field' => 'foo', 'priority' => 1, 'order' => 'DESC'
],
['field' => 'id', 'priority' => 2, 'order' => 'ASC'
],
],
]),
(new ProductSortingEntity())->
assign([ '_uniqueIdentifier' => 'bar',
'key' => 'bar',