23
23
require_once __DIR__ . "/../../../../../../Model/Product/Feed/Builder/InventoryInterface.php " ;
24
24
require_once __DIR__ . "/../../../../../../Model/Product/Feed/Builder/MultiSourceInventory.php " ;
25
25
require_once __DIR__ . "/../../../../../../../BusinessExtension/Model/System/Config.php " ;
26
+ require_once __DIR__ . "/../../../../../../../BusinessExtension/Helper/FBEHelper.php " ;
26
27
27
28
28
29
use Magento \Catalog \Model \Product ;
35
36
use Magento \InventorySalesApi \Model \StockByWebsiteIdResolverInterface ;
36
37
use Magento \Store \Model \Store ;
37
38
use Meta \BusinessExtension \Model \System \Config as SystemConfig ;
39
+ use Meta \BusinessExtension \Helper \FBEHelper ;
38
40
use Meta \Catalog \Model \Product \Feed \Builder \InventoryInterface ;
39
41
use Meta \Catalog \Model \Product \Feed \Builder \MultiSourceInventory ;
40
42
use PHPUnit \Framework \TestCase ;
41
43
44
+ /**
45
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
46
+ */
47
+
42
48
class MultiSourceInventoryTest extends TestCase
43
49
{
44
50
/**
@@ -66,6 +72,11 @@ class MultiSourceInventoryTest extends TestCase
66
72
*/
67
73
private $ getProductSalableQtyInterface ;
68
74
75
+ /**
76
+ * @var FBEHelper
77
+ */
78
+ private $ fbeHelper ;
79
+
69
80
/**
70
81
* Used to set the values before running a test
71
82
*
@@ -77,20 +88,24 @@ public function setUp(): void
77
88
$ this ->isProductSalableInterface = $ this ->createStub (IsProductSalableInterface::class);
78
89
$ this ->stockByWebsiteIdResolver = $ this ->createStub (StockByWebsiteIdResolverInterface::class);
79
90
$ this ->getProductSalableQtyInterface = $ this ->createStub (GetProductSalableQtyInterface::class);
91
+ $ this ->fbeHelper = $ this ->createStub (FBEHelper::class);
80
92
81
93
$ getStockItemConfiguration = $ this ->createStub (GetStockItemConfigurationInterface::class);
82
94
$ stockItemRepository = $ this ->createStub (StockItemRepositoryInterface::class);
83
95
$ stockItemCriteriaInterfaceFactory = $ this ->createStub (StockItemCriteriaInterfaceFactory::class);
84
96
85
97
$ this ->inventory = $ this ->getMockBuilder (MultiSourceInventory::class)
86
98
->enableOriginalConstructor ()
87
- ->setConstructorArgs ([$ this ->isProductSalableInterface ,
99
+ ->setConstructorArgs ([
100
+ $ this ->isProductSalableInterface ,
88
101
$ this ->getProductSalableQtyInterface ,
89
102
$ this ->systemConfig ,
90
103
$ this ->stockByWebsiteIdResolver ,
91
104
$ getStockItemConfiguration ,
92
105
$ stockItemRepository ,
93
- $ stockItemCriteriaInterfaceFactory ])
106
+ $ stockItemCriteriaInterfaceFactory ,
107
+ $ this ->fbeHelper
108
+ ])
94
109
->onlyMethods (['isInStock ' , 'getStockQty ' , 'isStockManagedForProduct ' ])
95
110
->getMock ();
96
111
}
0 commit comments