Example #1
0
 /**
  * @param CartInterface $cart
  * @param CartItemInterface $item
  */
 public function removeFromCart(CartInterface $cart, CartItemInterface $item)
 {
     $cart->removeItem($item);
     $this->orderProcessor->process($cart);
 }
 function it_removes_cart_item_from_cart(OrderProcessorInterface $orderProcessor, CartInterface $cart, CartItemInterface $cartItem)
 {
     $cart->removeItem($cartItem)->shouldBeCalled();
     $orderProcessor->process($cart)->shouldBeCalled();
     $this->removeFromCart($cart, $cartItem);
 }