Example #1
0
 function it_should_remove_a_item_to_a_cart_from_event(CartItemEvent $event, CartInterface $cart, CartItemInterface $cartItem)
 {
     $event->getCart()->willReturn($cart);
     $event->getItem()->willReturn($cartItem);
     $cart->removeItem($cartItem)->shouldBeCalled();
     $this->removeItem($event);
 }
Example #2
0
 /**
  * @param CartItemEvent $event
  */
 public function removeItem(CartItemEvent $event)
 {
     $cart = $event->getCart();
     $cart->removeItem($event->getItem());
 }