Skip to content

Commit 9e1b676

Browse files
committed
ACP2E-1826: [Cloud] reorder shippinng zipcode does not update the latest shipping zip code
1 parent 629423a commit 9e1b676

File tree

1 file changed

+8
-7
lines changed
  • dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/Create

1 file changed

+8
-7
lines changed

dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/Create/ReorderTest.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,10 @@ public function testReorderBillingAndShippingAddresses(): void
272272
$order = $this->fixtures->get('order');
273273

274274
$customerBillingAddressId = $order->getBillingAddress()->getCustomerAddressId();
275-
$this->updateCustomerAddress($customerBillingAddressId, ['postcode' => $billingPostCode]);
275+
$this->updateCustomerAddress((int)$customerBillingAddressId, ['postcode' => $billingPostCode]);
276276

277277
$customerShippingAddressId = $order->getShippingAddress()->getCustomerAddressId();
278-
$this->updateCustomerAddress($customerShippingAddressId, ['postcode' => $shippingPostCode]);
278+
$this->updateCustomerAddress((int)$customerShippingAddressId, ['postcode' => $shippingPostCode]);
279279

280280
$this->reorder($order, $customer->getEmail());
281281

@@ -303,11 +303,12 @@ public function testReorderBillingAndShippingAddresses(): void
303303
/**
304304
* Update customer address information
305305
*
306-
* @param $addressId
306+
* @param int $addressId
307307
* @param array $updateData
308+
* @return void
308309
* @throws LocalizedException
309310
*/
310-
private function updateCustomerAddress($addressId, array $updateData)
311+
private function updateCustomerAddress(int $addressId, array $updateData): void
311312
{
312313
$address = $this->addressRepository->getById($addressId);
313314
foreach ($updateData as $setFieldName => $setValue) {
@@ -319,11 +320,11 @@ private function updateCustomerAddress($addressId, array $updateData)
319320
/**
320321
* Place reorder request
321322
*
322-
* @param $order
323-
* @param $customerEmail
323+
* @param OrderInterface $order
324+
* @param string $customerEmail
324325
* @return void
325326
*/
326-
private function reorder($order, $customerEmail): void
327+
private function reorder(OrderInterface $order, string $customerEmail): void
327328
{
328329
$this->dispatchReorderRequest((int)$order->getId());
329330
$this->assertRedirect($this->stringContains('backend/sales/order_create'));

0 commit comments

Comments
 (0)