public function testFindOneByUuId()
 {
     $originalCart = $this->setupCart();
     $this->setCountLogger();
     $cart = $this->cartRepository->findOneById($originalCart->getId());
     $cart->getUser()->getCreated();
     $cart->getTaxRate()->getCreated();
     $this->visitElements($cart->getCartItems());
     $this->visitElements($cart->getCoupons());
     $this->assertEntitiesEqual($originalCart, $cart);
     $this->assertSame(3, $this->getTotalQueries());
 }
Esempio n. 2
0
 /**
  * @param UuidInterface $cartId
  * @param ShipmentRate $shipmentRate
  */
 public function setShipmentRate(UuidInterface $cartId, ShipmentRate $shipmentRate)
 {
     $cart = $this->cartRepository->findOneById($cartId);
     $cart->setShipmentRate($shipmentRate);
     $this->cartRepository->update($cart);
 }