Skip to content

Commit 69cdad0

Browse files
Check for PHP 8.3 needs to be in contructor of GraphQlStateDiff
1 parent 1559f54 commit 69cdad0

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlCheckoutMutationsStateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function setUp(): void
3939
$this->markTestSkipped('GraphQlStateDiff class is not available on this version of Magento.');
4040
}
4141

42-
$this->graphQlStateDiff = new GraphQlStateDiff();
42+
$this->graphQlStateDiff = new GraphQlStateDiff($this);
4343
parent::setUp();
4444
}
4545

dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlCustomerMutationsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function setUp(): void
3636
$this->markTestSkipped('GraphQlStateDiff class is not available on this version of Magento.');
3737
}
3838

39-
$this->graphQlStateDiff = new GraphQlStateDiff();
39+
$this->graphQlStateDiff = new GraphQlStateDiff($this);
4040
parent::setUp();
4141
}
4242

dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function setUp(): void
3939
$this->markTestSkipped('GraphQlStateDiff class is not available on this version of Magento.');
4040
}
4141

42-
$this->graphQlStateDiff = new GraphQlStateDiff();
42+
$this->graphQlStateDiff = new GraphQlStateDiff($this);
4343
parent::setUp();
4444
}
4545

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,15 @@ class GraphQlStateDiff
5858
/**
5959
* Constructor
6060
*/
61-
public function __construct()
61+
public function __construct(TestCase $test = null)
6262
{
63+
if (8 == PHP_MAJOR_VERSION && PHP_MINOR_VERSION < 4) {
64+
$test->markTestSkipped(
65+
"This test isn't compatible with PHP 8.3 versions less than PHP 8.3.4 because of "
66+
. "bug in garbage collector. https://github.com/php/php-src/issues/13569"
67+
. " will roll back in AC-11491"
68+
);
69+
}
6370
$this->objectManagerBeforeTest = Bootstrap::getObjectManager();
6471
$this->objectManagerForTest = new ObjectManager($this->objectManagerBeforeTest);
6572
$this->objectManagerForTest->getFactory()->setObjectManager($this->objectManagerForTest);
@@ -116,13 +123,6 @@ public function testState(
116123
string $expected,
117124
TestCase $test
118125
): void {
119-
if (8 == PHP_MAJOR_VERSION && PHP_MINOR_VERSION < 4) {
120-
$test->markTestSkipped(
121-
"This test isn't compatible with PHP 8.3 versions less than PHP 8.3.4 because of "
122-
. "bug in garbage collector. https://github.com/php/php-src/issues/13569"
123-
. " will roll back in AC-11491"
124-
);
125-
}
126126
if (array_key_exists(1, $authInfo)) {
127127
$authInfo1 = $authInfo[0];
128128
$authInfo2 = $authInfo[1];

0 commit comments

Comments
 (0)