PaymentRecurringProcessor example

->expects(static::once())
            ->method('search')
            ->with($criteria, Context::createDefaultContext())
            ->willReturn(new EntitySearchResult('order', 0, new OrderCollection(), null, $criteria, Context::createDefaultContext()));

        $dispatcher = $this->createMock(EventDispatcherInterface::class);
        $dispatcher
            ->expects(static::once())
            ->method('dispatch')
            ->with(static::isInstanceOf(RecurringPaymentOrderCriteriaEvent::class));

        $processor = new PaymentRecurringProcessor(
            $repo,
            $this->createMock(InitialStateIdLoader::class),
            $this->createMock(OrderTransactionStateHandler::class),
            $this->createMock(PaymentHandlerRegistry::class),
            new PaymentTransactionStructFactory(),
            $dispatcher,
        );

        static::expectException(OrderException::class);

        $processor->processRecurring($orderId, Context::createDefaultContext());
    }
Home | Imprint | This part of the site doesn't use cookies.