Пример #1
0
 /**
  * @param OrderInterface $order
  *
  * @return OrderInterface
  */
 public function recalculate(OrderInterface $order)
 {
     $this->pricesRecalculator->recalculate($order);
     $this->shippingChargesProcessor->applyShippingCharges($order);
     $this->promotionProcessor->process($order);
     $this->taxesApplicator->apply($order);
 }
Пример #2
0
 /**
  * @param OrderInterface $order
  *
  * @return OrderInterface
  */
 public function recalculate(OrderInterface $order)
 {
     $this->adjustmentsRemover->removeFrom($order);
     $this->pricesRecalculator->recalculate($order);
     $this->shippingChargesProcessor->applyShippingCharges($order);
     $this->promotionProcessor->process($order);
     $this->taxesProcessor->process($order);
 }
Пример #3
0
 function it_recalculates_order_promotions_taxes_and_shipping_charges(PromotionProcessorInterface $promotionProcessor, PricesRecalculatorInterface $pricesRecalculator, OrderTaxesProcessorInterface $taxesProcessor, ShippingChargesProcessorInterface $shippingChargesProcessor, OrderInterface $order)
 {
     $pricesRecalculator->recalculate($order);
     $promotionProcessor->process($order)->shouldBeCalled();
     $taxesProcessor->process($order)->shouldBeCalled();
     $shippingChargesProcessor->applyShippingCharges($order)->shouldBeCalled();
     $this->recalculate($order);
 }