@@ -169,36 +169,41 @@ public function testUpdateProductWithValidQtyAndNoDescription()
169169 ],
170170 'name ' => 'Test Wish List ' ,
171171 ], as: 'wishlist ' )
172- ]
173- public function testClearWishlistDescription (): void
174- {
175- $ customerEmail = $ this ->fixtures ->get ('customer ' )->getEmail ();
176- $ wishlist = $ this ->getWishlist ($ customerEmail );
172+ ]
173+ public function testClearWishlistDescription (): void
174+ {
175+ $ customerEmail = $ this ->fixtures ->get ('customer ' )->getEmail ();
176+ $ wishlist = $ this ->getWishlist ($ customerEmail );
177177
178- $ customerWishlist = $ wishlist ['customer ' ]['wishlists ' ][0 ];
179- $ wishlistId = $ customerWishlist ['id ' ];
180- $ wishlistItem = $ customerWishlist ['items_v2 ' ]['items ' ][0 ];
181- $ qty = 5 ;
182- $ description = 'New Description ' ;
178+ $ customerWishlist = $ wishlist ['customer ' ]['wishlists ' ][0 ];
179+ $ wishlistId = $ customerWishlist ['id ' ];
180+ $ wishlistItem = $ customerWishlist ['items_v2 ' ]['items ' ][0 ];
181+ $ qty = 5 ;
182+ $ description = 'New Description ' ;
183183
184- $ updateWishlistQuery = $ this ->getQuery ($ wishlistId , $ wishlistItem ['id ' ], $ qty , $ description );
185- $ response = $ this ->graphQlMutation ($ updateWishlistQuery , [], '' , $ this ->getHeaderMap ($ customerEmail ));
184+ $ updateWishlistQuery = $ this ->getQuery ($ wishlistId , $ wishlistItem ['id ' ], $ qty , $ description );
185+ $ response = $ this ->graphQlMutation ($ updateWishlistQuery , [], '' , $ this ->getHeaderMap ($ customerEmail ));
186186
187- $ this ->assertArrayHasKey ('updateProductsInWishlist ' , $ response );
188- $ this ->assertArrayHasKey ('wishlist ' , $ response ['updateProductsInWishlist ' ]);
189- $ wishlistResponse = $ response ['updateProductsInWishlist ' ]['wishlist ' ];
190- $ this ->assertEquals ($ qty , $ wishlistResponse ['items_v2 ' ]['items ' ][0 ]['quantity ' ]);
191- $ this ->assertEquals ($ description , $ wishlistResponse ['items_v2 ' ]['items ' ][0 ]['description ' ]);
187+ $ this ->assertArrayHasKey ('updateProductsInWishlist ' , $ response );
188+ $ this ->assertArrayHasKey ('wishlist ' , $ response ['updateProductsInWishlist ' ]);
189+ $ wishlistResponse = $ response ['updateProductsInWishlist ' ]['wishlist ' ];
190+ $ this ->assertEquals ($ qty , $ wishlistResponse ['items_v2 ' ]['items ' ][0 ]['quantity ' ]);
191+ $ this ->assertEquals ($ description , $ wishlistResponse ['items_v2 ' ]['items ' ][0 ]['description ' ]);
192192
193- $ updateWishlistQueryNoDescription = $ this ->getQuery ($ wishlistId , $ wishlistItem ['id ' ], $ qty , "" );
194- $ responseNoDescription = $ this ->graphQlMutation ($ updateWishlistQueryNoDescription , [], '' , $ this ->getHeaderMap ($ customerEmail ));
193+ $ updateWishlistQueryNoDescription = $ this ->getQuery ($ wishlistId , $ wishlistItem ['id ' ], $ qty , "" );
194+ $ responseNoDescription = $ this ->graphQlMutation (
195+ $ updateWishlistQueryNoDescription ,
196+ [],
197+ '' ,
198+ $ this ->getHeaderMap ($ customerEmail )
199+ );
195200
196- $ this ->assertArrayHasKey ('updateProductsInWishlist ' , $ responseNoDescription );
197- $ this ->assertArrayHasKey ('wishlist ' , $ responseNoDescription ['updateProductsInWishlist ' ]);
198- $ wishlistResponseNoDescription = $ responseNoDescription ['updateProductsInWishlist ' ]['wishlist ' ];
199- $ this ->assertEquals ($ qty , $ wishlistResponseNoDescription ['items_v2 ' ]['items ' ][0 ]['quantity ' ]);
200- $ this ->assertEquals ('' , $ wishlistResponseNoDescription ['items_v2 ' ]['items ' ][0 ]['description ' ]);
201- }
201+ $ this ->assertArrayHasKey ('updateProductsInWishlist ' , $ responseNoDescription );
202+ $ this ->assertArrayHasKey ('wishlist ' , $ responseNoDescription ['updateProductsInWishlist ' ]);
203+ $ wishlistResponseNoDescription = $ responseNoDescription ['updateProductsInWishlist ' ]['wishlist ' ];
204+ $ this ->assertEquals ($ qty , $ wishlistResponseNoDescription ['items_v2 ' ]['items ' ][0 ]['quantity ' ]);
205+ $ this ->assertEquals ('' , $ wishlistResponseNoDescription ['items_v2 ' ]['items ' ][0 ]['description ' ]);
206+ }
202207
203208 /**
204209 * Authentication header map
0 commit comments