Skip to content

Commit e635781

Browse files
committed
MC-37502: Create automated test for "Move Order to Archive"
1 parent 17afad5 commit e635781

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dev/tests/integration/testsuite/Magento/Sales/_files/order_with_invoice_shipment_creditmemo.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Magento\Customer\Api\Data\AddressInterface;
1010
use Magento\Customer\Api\Data\CustomerInterface;
1111
use Magento\Framework\DB\Transaction;
12+
use Magento\OfflinePayments\Model\Checkmo;
1213
use Magento\Sales\Api\CreditmemoItemRepositoryInterface;
1314
use Magento\Sales\Api\CreditmemoRepositoryInterface;
1415
use Magento\Sales\Api\Data\CreditmemoItemInterfaceFactory;
@@ -60,9 +61,10 @@
6061
AddressInterface::CITY => 'Los Angeles',
6162
CustomerInterface::EMAIL => 'admin@example.com',
6263
AddressInterface::TELEPHONE => '11111111',
63-
AddressInterface::COUNTRY_ID => 'US'
64+
AddressInterface::COUNTRY_ID => 'US',
6465
];
6566
$product = $productRepository->get('simple');
67+
/** @var AddressFactory $addressFactory */
6668
$addressFactory = $objectManager->get(AddressFactory::class);
6769
$billingAddress = $addressFactory->create(['data' => $addressData]);
6870
$billingAddress->setAddressType(Address::TYPE_BILLING);
@@ -71,7 +73,7 @@
7173
/** @var OrderPaymentInterfaceFactory $paymentFactory */
7274
$paymentFactory = $objectManager->get(OrderPaymentInterfaceFactory::class);
7375
$payment = $paymentFactory->create();
74-
$payment->setMethod('checkmo')
76+
$payment->setMethod(Checkmo::PAYMENT_METHOD_CHECKMO_CODE)
7577
->setAdditionalInformation('last_trans_id', '11122')
7678
->setAdditionalInformation('metadata', ['type' => 'free', 'fraudulent' => false]);
7779
/** @var OrderItemInterface $orderItem */

0 commit comments

Comments
 (0)