Ejemplo n.º 1
0
 /**
  * @param \Symfony\Component\HttpFoundation\Request $request
  *
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function sendPasswordRestoreTokenAction(Request $request)
 {
     $customerTransfer = new CustomerTransfer();
     $customerTransfer->setIdCustomer($this->castId($request->query->get('id')));
     $this->getFacade()->sendPasswordRestoreMail($customerTransfer);
     return $this->redirectResponse('/customer/profile?id=' . $this->castId($request->query->get('id')));
 }
Ejemplo n.º 2
0
 /**
  * @return void
  */
 public function testRemoveItem()
 {
     $wishlist = new WishlistTransfer();
     $customerTransfer = new CustomerTransfer();
     $customerTransfer->setIdCustomer(1);
     $sypWishlist = new WishlistSpy();
     $sypWishlist->setFkCustomer(1);
     $spyWishlistItem = new WishlistItemSpy();
     $spyWishlistItem->setQuantity(3);
     $spyWishlistItem->setFkProductAbstract(1);
     $spyWishlistItem->setFkProduct(1);
     $spyWishlistItem->setGroupKey(123);
     $propelStorage = new Propel($this->getWishlistQueryContainerMock($sypWishlist, $spyWishlistItem), $this->getCustomerMock(), $wishlist, $customerTransfer, $this->getProductFacadeMock());
     $wishlistChange = new WishlistChangeTransfer();
     $wishlistItem = new ItemTransfer();
     $wishlistItem->setGroupKey('123');
     $wishlistItem->setQuantity(0);
     $wishlistChange->addItem($wishlistItem);
     $propelStorage->removeItems($wishlistChange);
     $this->assertTrue($spyWishlistItem->isDelete());
 }