/** * @param BuyerInterface $buyer * @param ExtractorResult $extractorResult */ private function copyValue(BuyerInterface $buyer, ExtractorResult $extractorResult) { switch ($extractorResult->getPropertyName()) { case TransformerProperties::BUYER_EMAIL: $buyer->setEmail($extractorResult->getValue()); break; case TransformerProperties::BUYER_PHONE: $buyer->setPhone($extractorResult->getValue()); break; case TransformerProperties::BUYER_FIRST_NAME: $buyer->setFirstName($extractorResult->getValue()); break; case TransformerProperties::BUYER_LAST_NAME: $buyer->setLastName($extractorResult->getValue()); break; default: } }
public function it_should_get_delivery_from_order(OrderInterface $order, BuyerInterface $buyer, ExtractorResult $extractorResult) { $buyer->getDelivery()->shouldBeCalled(); $this->transform($order, $extractorResult); }