Skip to content

Commit 628eec2

Browse files
MAGETWO-64833: [Github] PayPal Express Checkout Discards Address Line 2 For Billing and Shipping Addresses #8313
- Code refactoring
1 parent 8edb5e8 commit 628eec2

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

app/code/Magento/Paypal/Model/Express/Checkout.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,6 @@ public function getCheckoutMethod()
900900
* @param Address $address
901901
* @param array $exportedAddress
902902
* @return void
903-
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
904903
*/
905904
protected function _setExportedAddressData($address, $exportedAddress)
906905
{

dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CheckoutTest extends \PHPUnit_Framework_TestCase
2525
/**
2626
* @var ObjectManagerInterface
2727
*/
28-
private $_objectManager;
28+
private $objectManager;
2929

3030
/**
3131
* @var Info
@@ -59,7 +59,7 @@ class CheckoutTest extends \PHPUnit_Framework_TestCase
5959
*/
6060
protected function setUp()
6161
{
62-
$this->_objectManager = Bootstrap::getObjectManager();
62+
$this->objectManager = Bootstrap::getObjectManager();
6363

6464
$this->paypalInfo = $this->getMockBuilder(Info::class)
6565
->disableOriginalConstructor()
@@ -101,19 +101,19 @@ public function testPrepareCustomerQuote()
101101
$quote->setCheckoutMethod(Onepage::METHOD_CUSTOMER); // to dive into _prepareCustomerQuote() on switch
102102
$quote->getShippingAddress()->setSameAsBilling(0);
103103
$quote->setReservedOrderId(null);
104-
$customer = $this->_objectManager->create(\Magento\Customer\Model\Customer::class)->load(1);
104+
$customer = $this->objectManager->create(\Magento\Customer\Model\Customer::class)->load(1);
105105
$customer->setDefaultBilling(false)
106106
->setDefaultShipping(false)
107107
->save();
108108

109109
/** @var \Magento\Customer\Model\Session $customerSession */
110-
$customerSession = $this->_objectManager->get(\Magento\Customer\Model\Session::class);
110+
$customerSession = $this->objectManager->get(\Magento\Customer\Model\Session::class);
111111
$customerSession->loginById(1);
112112
$checkout = $this->_getCheckout($quote);
113113
$checkout->place('token');
114114

115115
/** @var \Magento\Customer\Api\CustomerRepositoryInterface $customerService */
116-
$customerService = $this->_objectManager->get(\Magento\Customer\Api\CustomerRepositoryInterface::class);
116+
$customerService = $this->objectManager->get(\Magento\Customer\Api\CustomerRepositoryInterface::class);
117117
$customer = $customerService->getById($quote->getCustomerId());
118118

119119
$this->assertEquals(1, $quote->getCustomerId());
@@ -166,7 +166,7 @@ public function testPlaceGuestQuote()
166166
*/
167167
protected function _getCheckout(Quote $quote)
168168
{
169-
return $this->_objectManager->create(
169+
return $this->objectManager->create(
170170
Checkout::class,
171171
[
172172
'params' => [
@@ -187,7 +187,7 @@ protected function _getCheckout(Quote $quote)
187187
public function testReturnFromPaypal()
188188
{
189189
$quote = $this->_getFixtureQuote();
190-
$this->checkoutModel = $this->_objectManager->create(
190+
$this->checkoutModel = $this->objectManager->create(
191191
Checkout::class,
192192
[
193193
'params' => ['quote' => $quote, 'config' => $this->paypalConfig],
@@ -294,7 +294,7 @@ public function testReturnFromPaypalIfCheckout()
294294
*/
295295
private function prepareCheckoutModel(Quote $quote)
296296
{
297-
$this->checkoutModel = $this->_objectManager->create(
297+
$this->checkoutModel = $this->objectManager->create(
298298
Checkout::class,
299299
[
300300
'params' => ['quote' => $quote, 'config' => $this->paypalConfig],
@@ -365,7 +365,7 @@ protected function _getExportedAddressFixture(array $addressData)
365365
protected function _getFixtureQuote()
366366
{
367367
/** @var \Magento\Quote\Model\ResourceModel\Quote\Collection $quoteCollection */
368-
$quoteCollection = $this->_objectManager->create(\Magento\Quote\Model\ResourceModel\Quote\Collection::class);
368+
$quoteCollection = $this->objectManager->create(\Magento\Quote\Model\ResourceModel\Quote\Collection::class);
369369

370370
return $quoteCollection->getLastItem();
371371
}

0 commit comments

Comments
 (0)