diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php b/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php index 43321133d3085..90efe6641b791 100644 --- a/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php +++ b/dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php @@ -57,6 +57,7 @@ protected function setUp(): void * @dataProvider queryDataProvider * @param string $query * @param array $variables + * @param array $variables2 This is the second set of variables to be used in the second request * @param string $operationName * @param string $expected * @return void diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/App/State/Collector.php b/dev/tests/integration/testsuite/Magento/GraphQl/App/State/Collector.php index ab9a29fbf7e44..2669d891b075c 100644 --- a/dev/tests/integration/testsuite/Magento/GraphQl/App/State/Collector.php +++ b/dev/tests/integration/testsuite/Magento/GraphQl/App/State/Collector.php @@ -38,7 +38,10 @@ private function cloneArray(array $array) : array return array_map( function ($element) { if (is_object($element)) { - return clone $element; + $reflectionElement = new \ReflectionObject($element); + if ($reflectionElement->isCloneable()) { + return clone $element; + } } if (is_array($element)) { return $this->cloneArray($element);