Skip to content

Commit 8edb5e8

Browse files
MAGETWO-64833: [Github] PayPal Express Checkout Discards Address Line 2 For Billing and Shipping Addresses #8313
- Added unit test
1 parent b424fdc commit 8edb5e8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

app/code/Magento/Paypal/Test/Unit/Model/Api/NvpTest.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,21 @@ public function testCallGetExpressCheckoutDetails()
194194
->method('read')
195195
->will($this->returnValue(
196196
"\r\n" . 'ACK=Success&SHIPTONAME=Ship%20To%20Name'
197+
. '&SHIPTOSTREET=testStreet'
198+
. '&SHIPTOSTREET2=testApartment'
199+
. '&BUSINESS=testCompany'
200+
. '&SHIPTOCITY=testCity'
201+
. '&PHONENUM=223322'
202+
. '&STATE=testSTATE'
197203
));
198204
$this->model->callGetExpressCheckoutDetails();
199-
$this->assertEquals('Ship To Name', $this->model->getExportedShippingAddress()->getData('firstname'));
205+
$address = $this->model->getExportedShippingAddress();
206+
$this->assertEquals('Ship To Name', $address->getData('firstname'));
207+
$this->assertEquals(implode("\n", ['testStreet','testApartment']), $address->getStreet());
208+
$this->assertEquals('testCompany', $address->getCompany());
209+
$this->assertEquals('testCity', $address->getCity());
210+
$this->assertEquals('223322', $address->getTelephone());
211+
$this->assertEquals('testSTATE', $address->getRegion());
200212
}
201213

202214
public function testGetDebugReplacePrivateDataKeys()

0 commit comments

Comments
 (0)