@@ -550,7 +550,6 @@ public function testGetBySkuFromCacheInitializedInGetById()
550
550
551
551
public function testSaveExisting ()
552
552
{
553
- $ this ->storeManagerMock ->expects ($ this ->any ())->method ('getWebsites ' )->willReturn ([1 => 'default ' ]);
554
553
$ this ->resourceModelMock ->expects ($ this ->any ())->method ('getIdBySku ' )->will ($ this ->returnValue (100 ));
555
554
$ this ->productFactoryMock ->expects ($ this ->any ())
556
555
->method ('create ' )
@@ -563,7 +562,6 @@ public function testSaveExisting()
563
562
->expects ($ this ->once ())
564
563
->method ('toNestedArray ' )
565
564
->will ($ this ->returnValue ($ this ->productData ));
566
- $ this ->productMock ->expects ($ this ->once ())->method ('getWebsiteIds ' )->willReturn ([]);
567
565
$ this ->productMock ->expects ($ this ->atLeastOnce ())->method ('getSku ' )->willReturn ($ this ->productData ['sku ' ]);
568
566
569
567
$ this ->assertEquals ($ this ->productMock , $ this ->model ->save ($ this ->productMock ));
@@ -585,7 +583,6 @@ public function testSaveNew()
585
583
->expects ($ this ->once ())
586
584
->method ('toNestedArray ' )
587
585
->will ($ this ->returnValue ($ this ->productData ));
588
- $ this ->productMock ->expects ($ this ->once ())->method ('getWebsiteIds ' )->willReturn ([]);
589
586
590
587
$ this ->assertEquals ($ this ->productMock , $ this ->model ->save ($ this ->productMock ));
591
588
}
@@ -610,7 +607,6 @@ public function testSaveUnableToSaveException()
610
607
->expects ($ this ->once ())
611
608
->method ('toNestedArray ' )
612
609
->will ($ this ->returnValue ($ this ->productData ));
613
- $ this ->productMock ->expects ($ this ->once ())->method ('getWebsiteIds ' )->willReturn ([]);
614
610
615
611
$ this ->model ->save ($ this ->productMock );
616
612
}
@@ -636,7 +632,6 @@ public function testSaveException()
636
632
->expects ($ this ->once ())
637
633
->method ('toNestedArray ' )
638
634
->will ($ this ->returnValue ($ this ->productData ));
639
- $ this ->productMock ->expects ($ this ->once ())->method ('getWebsiteIds ' )->willReturn ([]);
640
635
641
636
$ this ->model ->save ($ this ->productMock );
642
637
}
@@ -660,7 +655,6 @@ public function testSaveInvalidProductException()
660
655
->expects ($ this ->once ())
661
656
->method ('toNestedArray ' )
662
657
->will ($ this ->returnValue ($ this ->productData ));
663
- $ this ->productMock ->expects ($ this ->once ())->method ('getWebsiteIds ' )->willReturn ([]);
664
658
665
659
$ this ->model ->save ($ this ->productMock );
666
660
}
@@ -689,9 +683,6 @@ public function testSaveThrowsTemporaryStateExceptionIfDatabaseConnectionErrorOc
689
683
->expects ($ this ->once ())
690
684
->method ('toNestedArray ' )
691
685
->will ($ this ->returnValue ($ this ->productData ));
692
- $ this ->productMock ->expects ($ this ->once ())
693
- ->method ('getWebsiteIds ' )
694
- ->willReturn ([]);
695
686
696
687
$ this ->model ->save ($ this ->productMock );
697
688
}
@@ -839,7 +830,6 @@ public function testSaveExistingWithOptions(array $newOptions, array $existingOp
839
830
->method ('toNestedArray ' )
840
831
->will ($ this ->returnValue ($ this ->productData ));
841
832
842
- $ this ->initializedProductMock ->expects ($ this ->once ())->method ('getWebsiteIds ' )->willReturn ([]);
843
833
$ this ->initializedProductMock ->expects ($ this ->atLeastOnce ())
844
834
->method ('getSku ' )->willReturn ($ this ->productData ['sku ' ]);
845
835
$ this ->productMock ->expects ($ this ->atLeastOnce ())->method ('getSku ' )->willReturn ($ this ->productData ['sku ' ]);
@@ -1075,7 +1065,6 @@ public function testSaveWithLinks(array $newLinks, array $existingLinks, array $
1075
1065
$ outputLinks [] = $ outputLink ;
1076
1066
}
1077
1067
}
1078
- $ this ->initializedProductMock ->expects ($ this ->once ())->method ('getWebsiteIds ' )->willReturn ([]);
1079
1068
1080
1069
if (!empty ($ outputLinks )) {
1081
1070
$ this ->initializedProductMock ->expects ($ this ->once ())
@@ -1256,7 +1245,6 @@ public function testSaveExistingWithNewMediaGalleryEntries()
1256
1245
'media_type ' => 'media_type ' ,
1257
1246
]
1258
1247
);
1259
- $ this ->initializedProductMock ->expects ($ this ->once ())->method ('getWebsiteIds ' )->willReturn ([]);
1260
1248
$ this ->initializedProductMock ->expects ($ this ->atLeastOnce ())
1261
1249
->method ('getSku ' )->willReturn ($ this ->productData ['sku ' ]);
1262
1250
$ this ->productMock ->expects ($ this ->atLeastOnce ())->method ('getSku ' )->willReturn ($ this ->productData ['sku ' ]);
@@ -1297,7 +1285,6 @@ public function testSaveWithDifferentWebsites()
1297
1285
2 => ['second ' ],
1298
1286
3 => ['third ' ]
1299
1287
]);
1300
- $ this ->productMock ->expects ($ this ->once ())->method ('getWebsiteIds ' )->willReturn ([1 ,2 ,3 ]);
1301
1288
$ this ->productMock ->expects ($ this ->once ())->method ('setWebsiteIds ' )->willReturn ([2 ,3 ]);
1302
1289
1303
1290
$ this ->assertEquals ($ this ->productMock , $ this ->model ->save ($ this ->productMock ));
@@ -1368,7 +1355,6 @@ public function testSaveExistingWithMediaGalleryEntries()
1368
1355
$ this ->mediaGalleryProcessor ->expects ($ this ->once ())
1369
1356
->method ('setMediaAttribute ' )
1370
1357
->with ($ this ->initializedProductMock , ['image ' , 'small_image ' ], 'filename1 ' );
1371
- $ this ->initializedProductMock ->expects ($ this ->once ())->method ('getWebsiteIds ' )->willReturn ([]);
1372
1358
$ this ->initializedProductMock ->expects ($ this ->atLeastOnce ())
1373
1359
->method ('getSku ' )->willReturn ($ this ->productData ['sku ' ]);
1374
1360
$ this ->productMock ->expects ($ this ->atLeastOnce ())->method ('getSku ' )->willReturn ($ this ->productData ['sku ' ]);
0 commit comments