File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ function it_adds_cookie_items_to_user_items_if_both_exist(
6969 $ token ->getUser ()->willReturn ($ shopUser );
7070 $ interactiveLoginEvent ->getRequest ()->willReturn ($ request );
7171 $ request ->cookies = $ parameterBag ;
72- $ parameterBag ->get ('bitbag_sylius_wishlist ' )->willReturn ("Fq8N4W6mk12i9J2HX0U60POGG5UEzSgGW37OWd6sv2dd8FlBId " );
72+ $ parameterBag ->get ('bitbag_sylius_wishlist ' , '' )->willReturn ("Fq8N4W6mk12i9J2HX0U60POGG5UEzSgGW37OWd6sv2dd8FlBId " );
7373 $ wishlistRepository ->findByToken ("Fq8N4W6mk12i9J2HX0U60POGG5UEzSgGW37OWd6sv2dd8FlBId " )->willReturn ($ cookieWishlist );
7474 $ wishlistRepository ->findByShopUser ($ shopUser )->willReturn ($ userWishlist );
7575 $ cookieWishlist ->getWishlistProducts ()->willReturn (new ArrayCollection ([$ wishlistProduct ->getWrappedObject ()]));
@@ -94,7 +94,7 @@ function it_associates_anon_wishlsit_with_a_user_if_user_does_not_have_one(
9494 $ token ->getUser ()->willReturn ($ shopUser );
9595 $ interactiveLoginEvent ->getRequest ()->willReturn ($ request );
9696 $ request ->cookies = $ parameterBag ;
97- $ parameterBag ->get ('bitbag_sylius_wishlist ' )->willReturn ("Fq8N4W6mk12i9J2HX0U60POGG5UEzSgGW37OWd6sv2dd8FlBId " );
97+ $ parameterBag ->get ('bitbag_sylius_wishlist ' , '' )->willReturn ("Fq8N4W6mk12i9J2HX0U60POGG5UEzSgGW37OWd6sv2dd8FlBId " );
9898 $ wishlistRepository ->findByToken ("Fq8N4W6mk12i9J2HX0U60POGG5UEzSgGW37OWd6sv2dd8FlBId " )->willReturn ($ cookieWishlist );
9999 $ wishlistRepository ->findByShopUser ($ shopUser )->willReturn (null );
100100
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public function onInteractiveLogin(InteractiveLoginEvent $interactiveLoginEvent)
5858
5959 private function resolveWishlist (Request $ request , ShopUserInterface $ shopUser ): void
6060 {
61- $ cookieWishlistToken = $ request ->cookies ->get ($ this ->wishlistCookieToken );
61+ $ cookieWishlistToken = $ request ->cookies ->get ($ this ->wishlistCookieToken , '' );
6262 /** @var WishlistInterface|null $cookieWishlist */
6363 $ cookieWishlist = $ this ->wishlistRepository ->findByToken ($ cookieWishlistToken );
6464 $ userWishlist = $ this ->wishlistRepository ->findByShopUser ($ shopUser );
You can’t perform that action at this time.
0 commit comments