5
5
*/
6
6
namespace Magento \Wishlist \Test \Unit \Pricing \ConfiguredPrice ;
7
7
8
- use Magento \Framework \Pricing \Adjustment \CalculatorInterface ;
9
- use Magento \Framework \Pricing \PriceCurrencyInterface ;
10
- use Magento \Framework \Pricing \PriceInfoInterface ;
11
- use Magento \Framework \Pricing \SaleableInterface ;
12
- use Magento \Wishlist \Pricing \ConfiguredPrice \ConfigurableProduct ;
13
-
14
8
class ConfigurableProductTest extends \PHPUnit_Framework_TestCase
15
9
{
16
10
/**
17
- * @var SaleableInterface|\PHPUnit_Framework_MockObject_MockObject
11
+ * @var \Magento\Framework\Pricing\ SaleableInterface|\PHPUnit_Framework_MockObject_MockObject
18
12
*/
19
13
private $ saleableItem ;
20
14
21
15
/**
22
- * @var CalculatorInterface|\PHPUnit_Framework_MockObject_MockObject
16
+ * @var \Magento\Framework\Pricing\Adjustment\ CalculatorInterface|\PHPUnit_Framework_MockObject_MockObject
23
17
*/
24
18
private $ calculator ;
25
19
26
20
/**
27
- * @var PriceCurrencyInterface|\PHPUnit_Framework_MockObject_MockObject
21
+ * @var \Magento\Framework\Pricing\ PriceCurrencyInterface|\PHPUnit_Framework_MockObject_MockObject
28
22
*/
29
23
private $ priceCurrency ;
30
24
31
25
/**
32
- * @var ConfigurableProduct
26
+ * @var \Magento\Wishlist\Pricing\ConfiguredPrice\ ConfigurableProduct
33
27
*/
34
28
private $ model ;
35
29
36
30
/**
37
- * @var PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject
31
+ * @var \Magento\Framework\Pricing\ PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject
38
32
*/
39
33
private $ priceInfoMock ;
40
34
@@ -56,7 +50,7 @@ protected function setUp()
56
50
$ this ->priceCurrency = $ this ->getMockBuilder (\Magento \Framework \Pricing \PriceCurrencyInterface::class)
57
51
->getMockForAbstractClass ();
58
52
59
- $ this ->model = new ConfigurableProduct (
53
+ $ this ->model = new \ Magento \ Wishlist \ Pricing \ ConfiguredPrice \ ConfigurableProduct (
60
54
$ this ->saleableItem ,
61
55
null ,
62
56
$ this ->calculator ,
@@ -79,7 +73,7 @@ public function testGetValue()
79
73
->getMock ();
80
74
$ this ->priceInfoMock ->expects ($ this ->once ())
81
75
->method ('getPrice ' )
82
- ->with (ConfigurableProduct::PRICE_CODE )
76
+ ->with (\ Magento \ Wishlist \ Pricing \ ConfiguredPrice \ ConfigurableProduct::PRICE_CODE )
83
77
->willReturn ($ priceMock );
84
78
85
79
$ productMock = $ this ->getMockBuilder (\Magento \Catalog \Model \Product::class)
@@ -125,7 +119,7 @@ public function testGetValueWithNoCustomOption()
125
119
126
120
$ this ->priceInfoMock ->expects ($ this ->once ())
127
121
->method ('getPrice ' )
128
- ->with (ConfigurableProduct::PRICE_CODE )
122
+ ->with (\ Magento \ Wishlist \ Pricing \ ConfiguredPrice \ ConfigurableProduct::PRICE_CODE )
129
123
->willReturn ($ priceMock );
130
124
131
125
$ this ->assertEquals (100 , $ this ->model ->getValue ());
0 commit comments