-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6919 from magento-l3/PR_20210609
L3 Bugfix delivery. 2.4-develop
- Loading branch information
Showing
7 changed files
with
181 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
dev/tests/integration/testsuite/Magento/Sales/_files/order_canceled.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
use Magento\Sales\Api\Data\OrderInterfaceFactory; | ||
use Magento\Sales\Model\Order; | ||
use Magento\TestFramework\Helper\Bootstrap; | ||
use Magento\TestFramework\Workaround\Override\Fixture\Resolver; | ||
use Magento\Sales\Api\OrderManagementInterface; | ||
|
||
Resolver::getInstance()->requireDataFixture('Magento/Sales/_files/order.php'); | ||
|
||
$objectManager = Bootstrap::getObjectManager(); | ||
/** @var Order $order */ | ||
$order = $objectManager->get(OrderInterfaceFactory::class)->create()->loadByIncrementId('100000001'); | ||
/** @var OrderManagementInterface $orderManagement */ | ||
$orderManagement = $objectManager->create(OrderManagementInterface::class); | ||
$orderManagement->place($order); | ||
$orderManagement->cancel($order->getEntityId()); |
30 changes: 30 additions & 0 deletions
30
dev/tests/integration/testsuite/Magento/Sales/_files/order_canceled_rollback.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
use Magento\Framework\Registry; | ||
use Magento\Sales\Api\Data\OrderInterface; | ||
use Magento\Sales\Api\Data\OrderInterfaceFactory; | ||
use Magento\Sales\Api\OrderRepositoryInterface; | ||
use Magento\TestFramework\Helper\Bootstrap; | ||
use Magento\TestFramework\Workaround\Override\Fixture\Resolver; | ||
|
||
$objectManager = Bootstrap::getObjectManager(); | ||
/** @var OrderRepositoryInterface $orderRepository */ | ||
$orderRepository = $objectManager->get(OrderRepositoryInterface::class); | ||
/** @var OrderInterface $order */ | ||
$order = $objectManager->get(OrderInterfaceFactory::class)->create()->loadByIncrementId('100000001'); | ||
/** @var Registry $registry */ | ||
$registry = $objectManager->get(Registry::class); | ||
$registry->unregister('isSecureArea'); | ||
$registry->register('isSecureArea', true); | ||
|
||
$orderRepository->delete($order); | ||
|
||
$registry->unregister('isSecureArea'); | ||
$registry->register('isSecureArea', false); | ||
|
||
Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/product_simple_rollback.php'); |