Skip to content

Commit 3fdce28

Browse files
committed
ACP2E-3363: Magento\GraphQl\App\GraphQlCustomerMutationsTest.php Integration Test failure
1 parent 6f6d2fb commit 3fdce28

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

dev/tests/integration/testsuite/Magento/GraphQl/App/State/GraphQlStateDiff.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ class GraphQlStateDiff
5757
*/
5858
private readonly Comparator $comparator;
5959

60+
/**
61+
* @var State
62+
*/
63+
private State $appState;
64+
65+
/**
66+
* @var string
67+
*/
68+
private string $currentArea;
69+
6070
/**
6171
* Constructor
6272
*/
@@ -68,7 +78,9 @@ public function __construct()
6878
AppObjectManager::setInstance($this->objectManagerForTest);
6979
Bootstrap::setObjectManager($this->objectManagerForTest);
7080
$this->comparator = $this->objectManagerForTest->create(Comparator::class);
71-
$this->objectManagerForTest->get(State::class)->setAreaCode(Area::AREA_GRAPHQL);
81+
$this->appState = $this->objectManagerForTest->get(State::class);
82+
$this->currentArea = $this->appState->getAreaCode();
83+
$this->appState->setAreaCode(Area::AREA_GRAPHQL);
7284
$this->objectManagerForTest->_resetState();
7385
}
7486

@@ -89,6 +101,7 @@ public function getTestObjectManager()
89101
*/
90102
public function tearDown(): void
91103
{
104+
$this->appState->setAreaCode($this->currentArea);
92105
$this->objectManagerBeforeTest->getFactory()->setObjectManager($this->objectManagerBeforeTest);
93106
AppObjectManager::setInstance($this->objectManagerBeforeTest);
94107
Bootstrap::setObjectManager($this->objectManagerBeforeTest);

0 commit comments

Comments
 (0)