/** * @param OrderInterface $order * * @return $this */ private function checkBuyer(OrderInterface $order) { $buyer = $order->getBuyer(); if ($buyer->isFilled()) { $this->groups[] = self::BUYER_GROUP; } return $this->checkInvoice($buyer->getInvoice())->checkDelivery($buyer->getDelivery()); }
/** * @inheritdoc */ public function transform(OrderInterface $order, ExtractorResult $extractorResult) { $this->copyValue($order->getBuyer(), $extractorResult); }
public function let(OrderInterface $order, BuyerInterface $buyer, DeliveryInterface $delivery) { $order->getBuyer()->willReturn($buyer); $buyer->getDelivery()->willReturn($delivery); }
public function it_should_get_buyer_from_order(OrderInterface $order, ExtractorResult $extractorResult) { $order->getBuyer()->shouldBeCalledTimes(1); $this->transform($order, $extractorResult); }
/** * @inheritdoc */ public function transform(OrderInterface $order, ExtractorResult $extractorResult) { $this->copyValue($order->getBuyer()->getInvoice(), $extractorResult->getPropertyName(), $extractorResult->getValue())->copyRecipientValue($order->getBuyer()->getInvoice(), $extractorResult->getPropertyName(), $extractorResult->getValue()); }