TestStockUpdateFilter example

/** * @internal * * @covers \Shopware\Core\Content\Product\DataAbstractionLayer\StockUpdate\StockUpdateFilterProvider */
class StockUpdateFilterProviderTest extends TestCase
{
    public function testHandlesFilter(): void
    {
        $ids = ['id1', 'id2', 'id3'];

        $filter = new TestStockUpdateFilter(['id1', 'id2']);

        $provider = new StockUpdateFilterProvider([$filter]);

        static::assertEquals(['id3']$provider->filterProductIdsForStockUpdates($ids, Context::createDefaultContext()));
    }
}
Home | Imprint | This part of the site doesn't use cookies.