lowQuantityCollection = Bootstrap::getObjectManager()->create(LowQuantityCollection::class); } /** * Tests that products from disabled sources are not present. * Each source code is used exclusively in one source item, so we check only source codes. * * @magentoDataFixture ../../../../app/code/Magento/InventoryApi/Test/_files/products.php * @magentoDataFixture ../../../../app/code/Magento/InventoryApi/Test/_files/sources.php * @magentoDataFixture ../../../../app/code/Magento/InventoryApi/Test/_files/stocks.php * @magentoDataFixture ../../../../app/code/Magento/InventoryApi/Test/_files/source_items.php * @magentoDataFixture ../../../../app/code/Magento/InventoryApi/Test/_files/stock_source_links.php * @codingStandardsIgnoreLine * @magentoDataFixture ../../../../app/code/Magento/InventoryLowQuantityNotificationApi/Test/_files/source_item_configuration.php */ public function testLowQuantityCollection() { $expectedSourceCodes = [ 'eu-1' ]; $actualSourceCodes = $this->lowQuantityCollection->getColumnValues( SourceItemConfigurationInterface::SOURCE_CODE ); $this->assertEquals($expectedSourceCodes, $actualSourceCodes); } }