@@ -110,7 +110,17 @@ protected function setUp()
110
110
$ this ->calculationFactory = $ this ->getMock ($ className , ['create ' ], [], '' , false );
111
111
112
112
$ className = '\Magento\Customer\Model\Session ' ;
113
- $ this ->customerSession = $ this ->getMock ($ className , [], [], '' , false );
113
+ $ this ->customerSession = $ this ->getMock (
114
+ $ className ,
115
+ ['getCustomerId ' , 'getDefaultTaxShippingAddress ' , 'getDefaultTaxBillingAddress ' , 'getCustomerTaxClassId ' ],
116
+ [],
117
+ '' ,
118
+ false
119
+ );
120
+ $ this ->customerSession ->expects ($ this ->any ())->method ('getCustomerId ' )->willReturn (null );
121
+ $ this ->customerSession ->expects ($ this ->any ())->method ('getDefaultTaxShippingAddress ' )->willReturn (null );
122
+ $ this ->customerSession ->expects ($ this ->any ())->method ('getDefaultTaxBillingAddress ' )->willReturn (null );
123
+ $ this ->customerSession ->expects ($ this ->any ())->method ('getCustomerTaxClassId ' )->willReturn (null );
114
124
115
125
$ className = '\Magento\Customer\Api\AccountManagementInterface ' ;
116
126
$ this ->accountManagement = $ this ->getMock ($ className , [], [], '' , false );
@@ -165,11 +175,9 @@ public function testGetProductWeeeAttributes()
165
175
$ calculation ->expects ($ this ->once ())
166
176
->method ('getRateRequest ' )
167
177
->willReturn ($ obj );
168
-
169
178
$ calculation ->expects ($ this ->once ())
170
179
->method ('getDefaultRateRequest ' )
171
180
->willReturn ($ obj );
172
-
173
181
$ calculation ->expects ($ this ->any ())
174
182
->method ('getRate ' )
175
183
->willReturn ('10 ' );
@@ -178,10 +186,6 @@ public function testGetProductWeeeAttributes()
178
186
->method ('getAttributeCodesByFrontendType ' )
179
187
->willReturn (['0 ' =>'fpt ' ]);
180
188
181
- $ website ->expects ($ this ->any ())
182
- ->method ('getId ' )
183
- ->willReturn (1 );
184
-
185
189
$ store ->expects ($ this ->any ())
186
190
->method ('getId ' )
187
191
->willReturn (1 );
@@ -190,6 +194,9 @@ public function testGetProductWeeeAttributes()
190
194
->method ('getId ' )
191
195
->willReturn (1 );
192
196
197
+ $ website ->expects ($ this ->any ())
198
+ ->method ('getId ' )
199
+ ->willReturn (1 );
193
200
$ website ->expects ($ this ->any ())
194
201
->method ('getDefaultGroup ' )
195
202
->willReturn ($ group );
0 commit comments