2020/**
2121 * Tests for wish list model.
2222 *
23- * @magentoDbIsolation enabled
23+ * @magentoDbIsolation disabled
2424 * @magentoAppIsolation disabled
2525 */
2626class WishlistTest extends TestCase
@@ -143,7 +143,12 @@ public function testAddConfigurableProductToWishList(): void
143143 $ configurableOptions = $ configurableProduct ->getTypeInstance ()->getConfigurableOptions ($ configurableProduct );
144144 $ attributeId = key ($ configurableOptions );
145145 $ 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+ ];
147152 $ wishlist = $ this ->getWishlistByCustomerId ->execute (1 );
148153 $ wishlist ->addNewItem ($ configurableProduct , $ buyRequest );
149154 $ item = $ this ->getWishlistByCustomerId ->getItemBySku (1 , 'Configurable product ' );
@@ -166,7 +171,12 @@ public function testAddBundleProductToWishList(): void
166171 $ option = reset ($ bundleOptions );
167172 $ productLinks = $ option ->getProductLinks ();
168173 $ 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+ ];
170180 $ skuWithChosenOption = implode ('- ' , [$ bundleProduct ->getSku (), $ productLinks [0 ]->getSku ()]);
171181 $ wishlist = $ this ->getWishlistByCustomerId ->execute (1 );
172182 $ wishlist ->addNewItem ($ bundleProduct , $ buyRequest );
0 commit comments