20
20
/**
21
21
* Tests for wish list model.
22
22
*
23
- * @magentoDbIsolation enabled
23
+ * @magentoDbIsolation disabled
24
24
* @magentoAppIsolation disabled
25
25
*/
26
26
class WishlistTest extends TestCase
@@ -143,7 +143,12 @@ public function testAddConfigurableProductToWishList(): void
143
143
$ configurableOptions = $ configurableProduct ->getTypeInstance ()->getConfigurableOptions ($ configurableProduct );
144
144
$ attributeId = key ($ configurableOptions );
145
145
$ option = reset ($ configurableOptions [$ attributeId ]);
146
- $ buyRequest = ['super_attribute ' => [$ attributeId => $ option ['value_index ' ]]];
146
+ $ buyRequest = [
147
+ 'super_attribute ' => [
148
+ $ attributeId => $ option ['value_index ' ]
149
+ ],
150
+ 'action ' => 'add ' ,
151
+ ];
147
152
$ wishlist = $ this ->getWishlistByCustomerId ->execute (1 );
148
153
$ wishlist ->addNewItem ($ configurableProduct , $ buyRequest );
149
154
$ item = $ this ->getWishlistByCustomerId ->getItemBySku (1 , 'Configurable product ' );
@@ -166,7 +171,12 @@ public function testAddBundleProductToWishList(): void
166
171
$ option = reset ($ bundleOptions );
167
172
$ productLinks = $ option ->getProductLinks ();
168
173
$ this ->assertNotNull ($ productLinks [0 ]);
169
- $ buyRequest = ['bundle_option ' => [$ option ->getOptionId () => $ productLinks [0 ]->getId ()]];
174
+ $ buyRequest = [
175
+ 'bundle_option ' => [
176
+ $ option ->getOptionId () => $ productLinks [0 ]->getId ()
177
+ ],
178
+ 'action ' => 'add ' ,
179
+ ];
170
180
$ skuWithChosenOption = implode ('- ' , [$ bundleProduct ->getSku (), $ productLinks [0 ]->getSku ()]);
171
181
$ wishlist = $ this ->getWishlistByCustomerId ->execute (1 );
172
182
$ wishlist ->addNewItem ($ bundleProduct , $ buyRequest );
0 commit comments