Exemplo n.º 1
0
 public function testAssignData()
 {
     $transportValue = 'something';
     $data = new DataObject([PaymentInterface::KEY_ADDITIONAL_DATA => [Express\Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT => $transportValue]]);
     $this->_model = $this->_helper->getObject('Magento\\Paypal\\Model\\Express', ['data' => [$this->_pro], 'checkoutSession' => $this->_checkoutSession, 'transactionBuilder' => $this->transactionBuilder, 'eventDispatcher' => $this->eventManagerMock]);
     $paymentInfo = $this->getMock(InfoInterface::class);
     $this->_model->setInfoInstance($paymentInfo);
     $paymentInfo->expects(static::once())->method('setAdditionalInformation')->with(Express\Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT, $transportValue);
     $this->_model->assignData($data);
 }