Skip to content

Commit 7ea9e09

Browse files
committed
ACPT-1388: Resolve failures in GraphQlStateTest.php
1 parent 652de7a commit 7ea9e09

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ protected function setUp(): void
5757
* @dataProvider queryDataProvider
5858
* @param string $query
5959
* @param array $variables
60+
* @param array $variables2 This is the second set of variables to be used in the second request
6061
* @param string $operationName
6162
* @param string $expected
6263
* @return void

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ private function cloneArray(array $array) : array
3838
return array_map(
3939
function ($element) {
4040
if (is_object($element)) {
41-
return clone $element;
41+
$reflectionElement = new \ReflectionObject($element);
42+
if ($reflectionElement->isCloneable()) {
43+
return clone $element;
44+
}
4245
}
4346
if (is_array($element)) {
4447
return $this->cloneArray($element);

0 commit comments

Comments
 (0)