@@ -49,6 +49,7 @@ protected function setUp()
49
49
'save ' ,
50
50
'getShippingAddress ' ,
51
51
'getCouponCode ' ,
52
+ 'getStoreId ' ,
52
53
'__wakeup '
53
54
]);
54
55
$ this ->quoteAddressMock = $ this ->createPartialMock (\Magento \Quote \Model \Quote \Address::class, [
@@ -100,6 +101,9 @@ public function testSetWhenCouldNotApplyCoupon()
100
101
$ cartId = 33 ;
101
102
$ couponCode = '153a-ABC ' ;
102
103
104
+ $ this ->storeMock ->expects ($ this ->any ())->method ('getId ' )->will ($ this ->returnValue (1 ));
105
+ $ this ->quoteMock ->expects ($ this ->once ())->method ('getStoreId ' )->willReturn ($ this ->returnValue (1 ));
106
+
103
107
$ this ->quoteRepositoryMock ->expects ($ this ->once ())
104
108
->method ('getActive ' )->with ($ cartId )->will ($ this ->returnValue ($ this ->quoteMock ));
105
109
$ this ->quoteMock ->expects ($ this ->once ())->method ('getItemsCount ' )->will ($ this ->returnValue (12 ));
@@ -127,6 +131,9 @@ public function testSetWhenCouponCodeIsInvalid()
127
131
$ cartId = 33 ;
128
132
$ couponCode = '153a-ABC ' ;
129
133
134
+ $ this ->storeMock ->expects ($ this ->any ())->method ('getId ' )->will ($ this ->returnValue (1 ));
135
+ $ this ->quoteMock ->expects ($ this ->once ())->method ('getStoreId ' )->willReturn ($ this ->returnValue (1 ));
136
+
130
137
$ this ->quoteRepositoryMock ->expects ($ this ->once ())
131
138
->method ('getActive ' )->with ($ cartId )->will ($ this ->returnValue ($ this ->quoteMock ));
132
139
$ this ->quoteMock ->expects ($ this ->once ())->method ('getItemsCount ' )->will ($ this ->returnValue (12 ));
@@ -146,6 +153,9 @@ public function testSet()
146
153
$ cartId = 33 ;
147
154
$ couponCode = '153a-ABC ' ;
148
155
156
+ $ this ->storeMock ->expects ($ this ->any ())->method ('getId ' )->will ($ this ->returnValue (1 ));
157
+ $ this ->quoteMock ->expects ($ this ->once ())->method ('getStoreId ' )->willReturn ($ this ->returnValue (1 ));
158
+
149
159
$ this ->quoteRepositoryMock ->expects ($ this ->once ())
150
160
->method ('getActive ' )->with ($ cartId )->will ($ this ->returnValue ($ this ->quoteMock ));
151
161
$ this ->quoteMock ->expects ($ this ->once ())->method ('getItemsCount ' )->will ($ this ->returnValue (12 ));
0 commit comments