Skip to content

Commit b798c85

Browse files
committed
MAGETWO-50893: No _Threshold_ message is displayed after buying product and its qty is not decreased
- fix tests
1 parent 0dab612 commit b798c85

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

app/code/Magento/CatalogInventory/Test/Unit/Model/Config/Backend/ManagestockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © 2016 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\CatalogInventory\Test\Unit\Model;
6+
namespace Magento\CatalogInventory\Test\Unit\Model\Config\Backend;
77

88
class ManagestockTest extends \PHPUnit_Framework_TestCase
99
{

dev/tests/integration/testsuite/Magento/Catalog/_files/product_virtual.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@
1616
->setTaxClassId(0)
1717
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
1818
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
19-
->save();
19+
->setStockData(
20+
[
21+
'qty' => 100,
22+
'is_in_stock' => 1,
23+
]
24+
)->save();

dev/tests/integration/testsuite/Magento/Paypal/_files/quote_payment_express.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@
2828
->setPrice(10)
2929
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
3030
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
31-
->save();
31+
->setStockData(
32+
[
33+
'qty' => 100,
34+
'is_in_stock' => 1,
35+
]
36+
)->save();
3237
$product->load(1);
3338

3439
$billingData = [

dev/tests/integration/testsuite/Magento/Sales/_files/quote.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
->setMetaDescription('meta description')
1818
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
1919
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
20-
->save();
20+
->setStockData(
21+
[
22+
'qty' => 100,
23+
'is_in_stock' => 1,
24+
]
25+
)->save();
2126

2227
$productRepository = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
2328
->create('Magento\Catalog\Api\ProductRepositoryInterface');

0 commit comments

Comments
 (0)