Skip to content

Commit 124e106

Browse files
committed
MQE-1561: CreateData action must be able to parse Data entity which references another data
- fix an issue when data is an array
1 parent 3a9b868 commit 124e106

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Magento/FunctionalTestingFramework/DataGenerator/Objects/EntityDataObject.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ public function getDataByName($name, $uniquenessFormat)
184184

185185
$dataReferenceResolver = new GenerationDataReferenceResolver();
186186
if (array_key_exists($name_lower, $this->data)) {
187+
if (is_array($this->data[$name_lower])) {
188+
return $this->data[$name_lower];
189+
}
187190
$uniquenessData = $this->getUniquenessDataByName($name_lower) === null
188191
? $dataReferenceResolver->getDataUniqueness(
189192
$this->data[$name_lower],
@@ -202,6 +205,9 @@ public function getDataByName($name, $uniquenessFormat)
202205
}
203206
return $this->formatUniqueData($name_lower, $uniquenessData, $uniquenessFormat);
204207
} elseif (array_key_exists($name, $this->data)) {
208+
if (is_array($this->data[$name_lower])) {
209+
return $this->data[$name];
210+
}
205211
$this->data[$name] = $dataReferenceResolver->getDataReference(
206212
$this->data[$name],
207213
$this->name . '.' . $name

0 commit comments

Comments
 (0)