Skip to content

Commit 9b9c710

Browse files
ACQE-8552: [AC-5466] Use DHL (US) Online Shipping Carrier on Checkout as a Registered Customer
- Removed space and unused address property.
1 parent b18fb27 commit 9b9c710

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

dev/tests/integration/testsuite/Magento/Dhl/PlaceOrderWithDhlUsCarrierTest.php

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,7 @@ class PlaceOrderWithDhlUsCarrierTest extends TestCase
5858
* @var CartManagementInterface
5959
*/
6060
private CartManagementInterface $cartManagement;
61-
62-
/**
63-
* @var AddressInterface
64-
*/
65-
private AddressInterface $address;
66-
61+
6762
/**
6863
* @var OrderRepositoryInterface
6964
*/
@@ -85,7 +80,6 @@ protected function setUp(): void
8580
$this->fixtures = $this->objectManager->get(DataFixtureStorageManager::class)->getStorage();
8681
$this->quoteRepository = $this->objectManager->get(CartRepositoryInterface::class);
8782
$this->cartManagement = $this->objectManager->get(CartManagementInterface::class);
88-
$this->address = $this->objectManager->get(AddressInterface::class);
8983
$this->orderRepository = $this->objectManager->get(OrderRepositoryInterface::class);
9084
}
9185

@@ -161,17 +155,15 @@ protected function setUp(): void
161155
'selections' => [['$product1.id$'], ['$product2.id$']]
162156
]
163157
),
164-
165158
]
166-
167159
/**
168160
* Verifies successful order placement using DHL-US shipping carrier
169161
*/
170162
public function testPlaceOrderWithAllProductTypes()
171163
{
172-
$cart = $this->fixtures->get('cart');
173-
$this->setShippingAndBillingAddressForQuote((int) $cart->getId());
174-
$orderId = $this->selectDhlAndCheckmoAndPlaceOrder((int) $cart->getId());
164+
$cartId = (int)$this->fixtures->get('cart')->getId();
165+
$this->setShippingAndBillingAddressForQuote($cartId);
166+
$orderId = $this->selectDhlAndCheckmoAndPlaceOrder($cartId);
175167
$order = $this->orderRepository->get($orderId);
176168
$this->assertNotEmpty($order->getIncrementId());
177169
$this->assertSame('dhl_P', $order->getShippingMethod());
@@ -219,6 +211,6 @@ private function selectDhlAndCheckmoAndPlaceOrder(int $cartId): int
219211
$quote->collectTotals();
220212
$quote->getPayment()->setMethod('checkmo');
221213
$this->quoteRepository->save($quote);
222-
return (int) $this->cartManagement->placeOrder($quote->getId());
214+
return (int)$this->cartManagement->placeOrder($quote->getId());
223215
}
224216
}

0 commit comments

Comments
 (0)