StockStorage example


    public function testLoadDoesNothing(): void
    {
        $ids = new IdsCollection();

        $productIds = $ids->getList(['p-1', 'p-2', 'p-3']);
        $salesChannelContext = $this->createMock(SalesChannelContext::class);

        $connection = $this->createMock(Connection::class);
        $dispatcher = $this->createMock(EventDispatcherInterface::class);

        $stockStorage = new StockStorage($connection$dispatcher);

        static::assertEquals(
            [],
            $stockStorage->load(new StockLoadRequest(array_values($productIds))$salesChannelContext)->all()
        );
    }
}
Home | Imprint | This part of the site doesn't use cookies.