Skip to content

Commit 66dc059

Browse files
ACPT-1660: Fix WebApi GraphQL tests on Application Server
* Add _resetState for Magento\Sales\Model\Order\Config::collection which is a collection of Order Status
1 parent f41d21a commit 66dc059

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

app/code/Magento/Sales/Model/Order/Config.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
namespace Magento\Sales\Model\Order;
77

88
use Magento\Framework\App\Area;
9-
use Magento\Framework\Exception\LocalizedException;
109
use Magento\Framework\App\ObjectManager;
10+
use Magento\Framework\Exception\LocalizedException;
11+
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
1112

1213
/**
1314
* Order configuration model
1415
*
1516
* @api
1617
* @since 100.0.2
1718
*/
18-
class Config
19+
class Config implements ResetAfterRequestInterface
1920
{
2021
/**
2122
* @var \Magento\Sales\Model\ResourceModel\Order\Status\Collection
@@ -84,6 +85,15 @@ public function __construct(
8485
$this->statusLabel = $statusLabel ?: ObjectManager::getInstance()->get(StatusLabel::class);
8586
}
8687

88+
/**
89+
* @inheritDoc
90+
*/
91+
public function _resetState(): void
92+
{
93+
$this->collection = null;
94+
}
95+
96+
8797
/**
8898
* Get collection.
8999
*

0 commit comments

Comments
 (0)