SortingListingProcessor example


class SortingProcessorTest extends TestCase
{
    /** * @dataProvider prepareProvider * * @param FieldSorting[] $expected */
    public function testPrepare(string $requested, array $expected): void
    {
        $processor = new SortingListingProcessor(
            new StaticSystemConfigService([
                'core.listing.defaultSorting' => 'foo',
            ]),
            new StaticEntityRepository([$this->buildSortings()])
        );

        $processor->prepare(
            new Request(['order' => $requested]),
            $criteria = new Criteria(),
            $this->createMock(SalesChannelContext::class)
        );

        
Home | Imprint | This part of the site doesn't use cookies.