/**
  * test Create Order from Cart.
  *
  * @group order
  */
 public function testCreateOrderFromCartNewOrderExistingOrder()
 {
     /**
      * @var OrderInterface    $order
      * @var CurrencyInterface $currency
      */
     $order = $this->getMock('Elcodi\\Component\\Cart\\Entity\\Order', null);
     $currency = $this->getMock('Elcodi\\Component\\Currency\\Entity\\Currency', null);
     $currency->setIso('EUR');
     $this->orderFactory->expects($this->never())->method('create')->will($this->returnValue($order));
     $this->cartLineOrderLineTransformer->expects($this->any())->method('createOrderLinesByCartLines')->will($this->returnValue(new ArrayCollection()));
     $customer = new Customer();
     $cart = new Cart();
     $cart->setCustomer($customer)->setPurchasableAmount(Money::create(20, $currency))->setCouponAmount(Money::create(0, $currency))->setOrder($order)->setShippingAmount($this->getMock('Elcodi\\Component\\Currency\\Entity\\Interfaces\\MoneyInterface'))->setAmount(Money::create(20, $currency))->setCartLines(new ArrayCollection());
     $this->cartOrderTransformer->createOrderFromCart($cart);
 }