Skip to content

Commit 59b3f61

Browse files
committed
MQE-910: [GitHub PR] The property of the parent element is used first when making a request
- added some comments
1 parent 824eccb commit 59b3f61

File tree

1 file changed

+3
-0
lines changed
  • src/Magento/FunctionalTestingFramework/DataGenerator/Persist

1 file changed

+3
-0
lines changed

src/Magento/FunctionalTestingFramework/DataGenerator/Persist/CurlHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,16 @@ private function resolveUrlReference($urlIn, $entityObjects)
197197
{
198198
$urlOut = $urlIn;
199199
$matchedParams = [];
200+
// Find all the params ({}) references
200201
preg_match_all("/[{](.+?)[}]/", $urlIn, $matchedParams);
201202

202203
if (!empty($matchedParams)) {
203204
foreach ($matchedParams[0] as $paramKey => $paramValue) {
204205
$paramEntityParent = "";
205206
$matchedParent = [];
206207
$dataItem = $matchedParams[1][$paramKey];
208+
// Find all the parent property (Type.key) references, assuming there will be only one
209+
// parent property reference within one param
207210
preg_match_all("/(.+?)\./", $dataItem, $matchedParent);
208211

209212
if (!empty($matchedParent) && !empty($matchedParent[0])) {

0 commit comments

Comments
 (0)