getStockUpdateFilterMock example



        $stockSubscriber->triggerChangeSet($event);

        static::assertFalse($updateCommand->requiresChangeSet());
    }

    public function testStockUpdateFilterOnOrderPlaced(): void
    {
        $ids = \array_values($this->ids->getList(['id1', 'id2']));

        $filter = $this->getStockUpdateFilterMock($ids);

        $stockUpdater = new StockUpdater(
            $this->getConnectionMock(),
            $this->dispatcher,
            new StockUpdateFilterProvider([$filter]),
        );

        $event = new CheckoutOrderPlacedEvent(
            Context::createDefaultContext(),
            $this->createOrder(),
            $this->ids->get('sales-channel')
        );
Home | Imprint | This part of the site doesn't use cookies.