getCurrentFilter example



        $context = $this->createMock(SalesChannelContext::class);
        $criteria = new Criteria();

        $processor->prepare(new Request()$criteria$context);

        $result = new ProductListingResult('test', 0, new ProductCollection(), null, $criteria, Context::createDefaultContext());

        $processor->process(new Request()$result$context);

        static::assertEquals(['foo']$result->getCurrentFilter('foo'));
    }

    public function testReduceAggregationBehavior(): void
    {
        $processor = new AggregationListingProcessor(
            [new FooListingFilterHandler()new BarListingFilterHandler()],
            $this->createMock(EventDispatcherInterface::class)
        );

        $processor->prepare(
            new Request(['reduce-aggregations' => true]),
            
Home | Imprint | This part of the site doesn't use cookies.