File tree Expand file tree Collapse file tree 2 files changed +1
-31
lines changed
app/code/Magento/CatalogInventory/Model
dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest Expand file tree Collapse file tree 2 files changed +1
-31
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,7 @@ public function __construct(
76
76
*/
77
77
public function verifyStock (StockItemInterface $ stockItem )
78
78
{
79
- if ((int ) $ stockItem ->getQty () === 0 &&
80
- $ stockItem ->getManageStock () &&
81
- $ stockItem ->getBackorders () == StockItemInterface::BACKORDERS_NO
82
- ) {
79
+ if ($ stockItem ->getQty () === null && $ stockItem ->getManageStock ()) {
83
80
return false ;
84
81
}
85
82
if ($ stockItem ->getBackorders () == StockItemInterface::BACKORDERS_NO
Original file line number Diff line number Diff line change @@ -153,33 +153,6 @@ public function testStockState()
153
153
$ this ->_model ->importData ();
154
154
}
155
155
156
- /**
157
- * Test that imported product stock status with backorders functionality enabled can be set to 'out of stock'.
158
- *
159
- * @magentoDbIsolation enabled
160
- *
161
- * @return void
162
- */
163
- public function testImportWithBackordersEnabled (): void
164
- {
165
- $ this ->importFile ('products_to_import_with_backorders_enabled_and_0_qty.csv ' );
166
- $ product = $ this ->getProductBySku ('simple_new ' );
167
- $ this ->assertFalse ($ product ->getDataByKey ('quantity_and_stock_status ' )['is_in_stock ' ]);
168
- }
169
-
170
- /**
171
- * Test that imported product stock status with stock quantity > 0 and backorders functionality disabled
172
- * can be set to 'out of stock'.
173
- *
174
- * @magentoDbIsolation enabled
175
- */
176
- public function testImportWithBackordersDisabled (): void
177
- {
178
- $ this ->importFile ('products_to_import_with_backorders_disabled_and_not_0_qty.csv ' );
179
- $ product = $ this ->getProductBySku ('simple_new ' );
180
- $ this ->assertFalse ($ product ->getDataByKey ('quantity_and_stock_status ' )['is_in_stock ' ]);
181
- }
182
-
183
156
/**
184
157
* Test that product stock status is updated after import
185
158
*
You can’t perform that action at this time.
0 commit comments