@@ -192,12 +192,6 @@ protected function setUp()
192
192
);
193
193
}
194
194
195
- public function testDispatchWithDisableAutoGroupChange ()
196
- {
197
- $ this ->setAttributeCodeValue ('disable_auto_group_change ' );
198
- $ this ->model ->dispatch ($ this ->observerMock );
199
- }
200
-
201
195
public function testDispatchWithDisableVatValidator ()
202
196
{
203
197
$ this ->vatValidatorMock ->expects ($ this ->once ())
@@ -217,7 +211,6 @@ public function testDispatchWithCustomerCountryNotInEUAndNotLoggedCustomerInGrou
217
211
->will ($ this ->returnValue ($ this ->groupInterfaceMock ));
218
212
$ this ->groupInterfaceMock ->expects ($ this ->once ())
219
213
->method ('getId ' )->will ($ this ->returnValue (0 ));
220
- $ this ->setAttributeCodeValue (false );
221
214
$ this ->vatValidatorMock ->expects ($ this ->once ())
222
215
->method ('isEnabled ' )
223
216
->with ($ this ->quoteAddressMock , $ this ->storeId )
@@ -254,7 +247,6 @@ public function testDispatchWithCustomerCountryNotInEUAndNotLoggedCustomerInGrou
254
247
255
248
public function testDispatchWithDefaultCustomerGroupId ()
256
249
{
257
- $ this ->setAttributeCodeValue (false );
258
250
$ this ->vatValidatorMock ->expects ($ this ->once ())
259
251
->method ('isEnabled ' )
260
252
->with ($ this ->quoteAddressMock , $ this ->storeId )
@@ -296,7 +288,6 @@ public function testDispatchWithDefaultCustomerGroupId()
296
288
297
289
public function testDispatchWithCustomerCountryInEU ()
298
290
{
299
- $ this ->setAttributeCodeValue (false );
300
291
$ this ->vatValidatorMock ->expects ($ this ->once ())
301
292
->method ('isEnabled ' )
302
293
->with ($ this ->quoteAddressMock , $ this ->storeId )
@@ -345,16 +336,4 @@ public function testDispatchWithCustomerCountryInEU()
345
336
->willReturn ($ this ->customerMock );
346
337
$ this ->model ->dispatch ($ this ->observerMock );
347
338
}
348
-
349
- protected function setAttributeCodeValue ($ value )
350
- {
351
- $ attributeInterface = $ this ->getMockForAbstractClass ('Magento\Framework\Api\AttributeInterface ' , [], '' , false );
352
- $ this ->customerMock ->expects ($ this ->any ())
353
- ->method ('getCustomAttribute ' )
354
- ->with ('disable_auto_group_change ' )
355
- ->willReturn ($ attributeInterface );
356
- $ attributeInterface ->expects ($ this ->once ())
357
- ->method ('getValue ' )
358
- ->willReturn ($ value );
359
- }
360
339
}
0 commit comments